diff --git a/tests/auto/tools/moc/cxx-attributes.h b/tests/auto/tools/moc/cxx-attributes.h index abd75afe98e..c4f27eb8c46 100644 --- a/tests/auto/tools/moc/cxx-attributes.h +++ b/tests/auto/tools/moc/cxx-attributes.h @@ -33,6 +33,7 @@ QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wunknown-attributes") +QT_WARNING_DISABLE_GCC("-Wattributes") class CppAttribute : public QObject { diff --git a/tests/auto/tools/moc/cxx11-explicit-override-control.h b/tests/auto/tools/moc/cxx11-explicit-override-control.h index 961d7c47c20..2fcf0fdb2d5 100644 --- a/tests/auto/tools/moc/cxx11-explicit-override-control.h +++ b/tests/auto/tools/moc/cxx11-explicit-override-control.h @@ -36,6 +36,9 @@ # define sealed #endif +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wsuggest-override") + class ExplicitOverrideControlBase : public QObject { Q_OBJECT @@ -234,6 +237,8 @@ private Q_SLOTS: #endif }; +QT_WARNING_POP + #ifndef Q_MOC_RUN # undef final # undef sealed diff --git a/tests/auto/tools/moc/tst_moc.cpp b/tests/auto/tools/moc/tst_moc.cpp index 8ce23826006..110b6b2d056 100644 --- a/tests/auto/tools/moc/tst_moc.cpp +++ b/tests/auto/tools/moc/tst_moc.cpp @@ -322,6 +322,8 @@ public: void foo(struct ForwardDeclaredStruct *); }; +QT_WARNING_PUSH +QT_WARNING_DISABLE_GCC("-Wunused-variable") void StructQObject::foo(struct ForwardDeclaredStruct *) { struct Inner { @@ -330,10 +332,11 @@ void StructQObject::foo(struct ForwardDeclaredStruct *) Q_DECL_UNUSED_MEMBER struct Inner unusedVariable; } - +QT_WARNING_POP QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wignored-qualifiers") +QT_WARNING_DISABLE_GCC("-Wignored-qualifiers") class TestClass : public MyNamespace::TestSuperClass, public DONT_CONFUSE_MOC(MyStruct), public DONT_CONFUSE_MOC_EVEN_MORE(MyStruct2, dummy, ignored) @@ -1764,6 +1767,7 @@ void tst_Moc::QTBUG5590_dummyProperty() QT_WARNING_PUSH QT_WARNING_DISABLE_CLANG("-Wignored-qualifiers") +QT_WARNING_DISABLE_GCC("-Wignored-qualifiers") class QTBUG7421_ReturnConstTemplate: public QObject { Q_OBJECT public slots: