diff options
author | Marco Bubke <marco.bubke@qt.io> | 2022-10-18 22:28:04 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2022-11-08 14:04:53 +0000 |
commit | 77e49a954ea85cb9fa2e1ccbde5ffc3992ea1be1 (patch) | |
tree | 7763924cdfe828f66e1a1857fbcf5aba02af6a47 /tests | |
parent | d9d4d1829af35e8d01ca812825b0d413904abca1 (diff) |
QmlDesigner: Workaround strange superClasses behavior
superClasses() return not only the super classes but the type itself. We
should later fix that and introduce something like prototypes().
Change-Id: Ied9c1edad40754cb995bfb26b8d65b0aa3d17753
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp index e57c4aac0f2..365748c1fb2 100644 --- a/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp +++ b/tests/auto/qml/qmldesigner/coretests/tst_testcore.cpp @@ -4821,7 +4821,7 @@ void tst_TestCore::testMetaInfoSimpleType() QCOMPARE(itemMetaInfo.minorVersion(), 1); // super classes - NodeMetaInfo qobject = itemMetaInfo.superClasses().front(); + NodeMetaInfo qobject = itemMetaInfo.superClasses()[1]; QVERIFY(qobject.isValid()); QVERIFY(qobject.isQtObject()); @@ -4849,7 +4849,7 @@ void tst_TestCore::testMetaInfoUncreatableType() QCOMPARE(animationTypeInfo.majorVersion(), 2); QCOMPARE(animationTypeInfo.minorVersion(), 1); - NodeMetaInfo qObjectTypeInfo = animationTypeInfo.superClasses().front(); + NodeMetaInfo qObjectTypeInfo = animationTypeInfo.superClasses()[1]; QVERIFY(qObjectTypeInfo.isValid()); QCOMPARE(qObjectTypeInfo.simplifiedTypeName(), QmlDesigner::TypeName("QtObject")); @@ -4867,7 +4867,7 @@ void tst_TestCore::testMetaInfoExtendedType() QVERIFY(typeInfo.hasProperty("font")); // from QGraphicsWidget QVERIFY(typeInfo.hasProperty("enabled")); // from QGraphicsItem - NodeMetaInfo graphicsObjectTypeInfo = typeInfo.superClasses().front(); + NodeMetaInfo graphicsObjectTypeInfo = typeInfo.superClasses()[1]; QVERIFY(graphicsObjectTypeInfo.isValid()); } @@ -4889,7 +4889,7 @@ void tst_TestCore::testMetaInfoCustomType() QVERIFY(propertyChangesInfo.hasProperty("restoreEntryValues")); QVERIFY(propertyChangesInfo.hasProperty("explicit")); - NodeMetaInfo stateOperationInfo = propertyChangesInfo.superClasses().front(); + NodeMetaInfo stateOperationInfo = propertyChangesInfo.superClasses()[1]; QVERIFY(stateOperationInfo.isValid()); QCOMPARE(stateOperationInfo.typeName(), QmlDesigner::TypeName("QtQuick.QQuickStateOperation")); QCOMPARE(stateOperationInfo.majorVersion(), -1); |