diff options
author | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-18 16:35:20 +0100 |
---|---|---|
committer | Fabian Kosmale <fabian.kosmale@qt.io> | 2020-11-30 17:16:21 +0100 |
commit | d27d2b5d72acb2a3be55d0af9ded4cd126a5f031 (patch) | |
tree | 3bfeee6cf74782a197db3c604367e63031528ede /tests/auto/corelib/kernel/qobject/tst_qobject.cpp | |
parent | 26e1a0997e1494433e43355cb56c05543ac56b5c (diff) |
QMetaProperty::typeName: use name from metatype
Except for types marked as unresolved, we're doing it anyway - the only
difference is that now we skip looking up the metatype by typeid.
[ChangeLog][QMetaProperty][Important Behavior Change]
QMetaProperty::typeName returns now always the same name as name() of the
corresponding metatype. This can cause a change for enum properties
which were not fully-qualified.
Change-Id: I1f57743948b7262ac06095d3bbc838d620f6e481
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto/corelib/kernel/qobject/tst_qobject.cpp')
-rw-r--r-- | tests/auto/corelib/kernel/qobject/tst_qobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp index 5cf1f0e50f..0fcae68505 100644 --- a/tests/auto/corelib/kernel/qobject/tst_qobject.cpp +++ b/tests/auto/corelib/kernel/qobject/tst_qobject.cpp @@ -1933,7 +1933,7 @@ void tst_QObject::property() QVERIFY(mo->indexOfProperty("alpha") != -1); property = mo->property(mo->indexOfProperty("alpha")); QVERIFY(property.isEnumType()); - QCOMPARE(property.typeName(), "Alpha"); + QCOMPARE(property.typeName(), "PropertyObject::Alpha"); QCOMPARE(property.userType(), QMetaType::fromType<PropertyObject::Alpha>().id()); QVariant var = object.property("alpha"); @@ -2015,7 +2015,7 @@ void tst_QObject::property() QVERIFY(mo->indexOfProperty("priority") != -1); property = mo->property(mo->indexOfProperty("priority")); QVERIFY(property.isEnumType()); - QCOMPARE(property.typeName(), "Priority"); + QCOMPARE(property.typeName(), "PropertyObject::Priority"); QCOMPARE(property.userType(), QMetaType::fromType<PropertyObject::Priority>().id()); var = object.property("priority"); @@ -2036,7 +2036,7 @@ void tst_QObject::property() QVERIFY(mo->indexOfProperty("priority") != -1); property = mo->property(mo->indexOfProperty("priority")); QVERIFY(property.isEnumType()); - QCOMPARE(property.typeName(), "Priority"); + QCOMPARE(property.typeName(), "PropertyObject::Priority"); QCOMPARE(property.type(), QVariant::UserType); QCOMPARE(property.userType(), priorityMetaTypeId); |