aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2021-12-23 13:24:00 +0100
committerAndrei Golubev <andrei.golubev@qt.io>2022-01-27 11:29:36 +0100
commit14e764dc331f0d5e2361cc69e3912b716b144ab8 (patch)
treed227c6105009398828a16f296f1acba044114b9a
parent1d1b935d6fd4eecc39704f326c9e566e34037a59 (diff)
Enhance tst_qmltc::componentTypes() by verifying that ids are correct
We can in fact check that the ids match to correct objects Change-Id: I46ed1a3d0a9ef429670fdc0438a5d717971c459c Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io> (cherry picked from commit feaed5f7aa6c82d9132e71037007b7c91ea57713) Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
-rw-r--r--tests/auto/qml/qmltc/tst_qmltc.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltc/tst_qmltc.cpp b/tests/auto/qml/qmltc/tst_qmltc.cpp
index f235b96acc..29cd95de31 100644
--- a/tests/auto/qml/qmltc/tst_qmltc.cpp
+++ b/tests/auto/qml/qmltc/tst_qmltc.cpp
@@ -582,6 +582,15 @@ void tst_qmltc::componentTypes()
QScopedPointer<QObject> enclosed(normalComponent->create());
QVERIFY(enclosed);
QCOMPARE(enclosed->objectName(), u"enclosed"_qs);
+
+ QQmlListReference children(&created, "data");
+ QCOMPARE(children.size(), 4);
+ QCOMPARE(ctx->objectForName(u"normal"_qs), children.at(0));
+ QCOMPARE(ctx->objectForName(u"accessibleNormal"_qs), children.at(1));
+ QCOMPARE(ctx->objectForName(u"accessible"_qs), created.p2());
+ QQuickTableView *table = qobject_cast<QQuickTableView *>(children.at(3));
+ QVERIFY(table);
+ QCOMPARE(ctx->objectForName(u"accessibleDelegate"_qs), table->delegate());
}
}