Silence a bunch of gcc warnings for the moc test
We deliberately expose moc to warning-worthy C++, but we don't want the compiler warnings coming from those. Change-Id: I09c36d7c8bfbb88f7bde61fa7bcc52a5adde81da Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
parent
c8f6f8a222
commit
5925daf969
@ -33,6 +33,7 @@
|
||||
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_CLANG("-Wunknown-attributes")
|
||||
QT_WARNING_DISABLE_GCC("-Wattributes")
|
||||
|
||||
class CppAttribute : public QObject
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user