summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2015-05-23 14:04:09 +0200
committerOlivier Goffart (Woboq GmbH) <ogoffart@woboq.com>2015-05-23 15:42:51 +0000
commit75af24a2d121ab56c5b60524bf1d7f2af1613025 (patch)
treedb4a23dd16f53ef7aa30f77081b54335b63ae033 /tests
parentd0b1c646b4a351f7eea2137c68993ae63b2b6bab (diff)
QMetaType: Do not automatically register types that derives from a Q_GADGET
Otherwise the type is registered with the wrong name Change-Id: I68ec3a05e2528816626e648b46ccc9d70b004866 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index b3333c6d68..691a4e819d 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -144,6 +144,7 @@ class CustomGadget {
};
class CustomNonQObject {};
+class GadgetDerived : public CustomGadget {};
void tst_QMetaType::defined()
{
@@ -153,6 +154,7 @@ void tst_QMetaType::defined()
QCOMPARE(int(QMetaTypeId2<int*>::Defined), 0);
QCOMPARE(int(QMetaTypeId2<CustomQObject::CustomQEnum>::Defined), 1);
QCOMPARE(int(QMetaTypeId2<CustomGadget>::Defined), 1);
+ QVERIFY(!QMetaTypeId2<GadgetDerived>::Defined);
QVERIFY(int(QMetaTypeId2<CustomQObject*>::Defined));
QVERIFY(!QMetaTypeId2<CustomQObject>::Defined);
QVERIFY(!QMetaTypeId2<CustomNonQObject>::Defined);