diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2013-09-14 13:18:15 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-14 20:33:29 +0200 |
commit | 7d7e8ae3fa79b06c916de1a7a10eed63611c5d25 (patch) | |
tree | bd663644f5f3d46e8760e0de908e2faaf5fff12e /tests/auto | |
parent | 6b9d1256214839dd18b2ba5c6fc6f007cf21869f (diff) |
Use Q_STATIC_ASSERT to report error about missing Q_OBJECT
Q_STATIC_ASSERT gives better error with C++11 enabled.
Aslo the qt_check_for_QOBJECT_macro had warning on some compiler since
it used null reference
Change-Id: Ic6115da800064b00c50a5762f0b79f5f656bf750
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index ff453d767b..081dc8a857 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -5931,5 +5931,9 @@ void tst_QObject::qmlConnect() #endif } +// Test for QtPrivate::HasQ_OBJECT_Macro +Q_STATIC_ASSERT(QtPrivate::HasQ_OBJECT_Macro<tst_QObject>::Value); +Q_STATIC_ASSERT(!QtPrivate::HasQ_OBJECT_Macro<SiblingDeleter>::Value); + QTEST_MAIN(tst_QObject) #include "tst_qobject.moc" |