aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-10-16 09:17:42 +0200
committerUlf Hermann <ulf.hermann@qt.io>2023-10-19 09:30:13 +0200
commitbf2258e6f44f1279eee5e9c2dd595c5dd2020784 (patch)
treeada16548f855b1b778bbfbb1ac1e09522c17e472 /tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
parentbbeca33068718b8f5b820d20085e42ca86a5ffd5 (diff)
QtQml: Don't unnecessarily detour through the CU to look up types
Since we also store partial types as QQmlType now, we can just look them up the regular way. Pick-to: 6.6 6.5 6.2 Fixes: QTBUG-117788 Change-Id: Id3e81853f802419f1121ef5e856c3272a3c977a1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index acbb21f2d6..cfe098ff37 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -432,6 +432,7 @@ private slots:
void callMethodOfAttachedDerived();
void multiVersionSingletons();
+ void typeAnnotationCycle();
private:
QQmlEngine engine;
@@ -8285,6 +8286,16 @@ void tst_qqmllanguage::multiVersionSingletons()
}
}
+void tst_qqmllanguage::typeAnnotationCycle()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, testFileUrl("TypeAnnotationCycle1.qml"));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(!o.isNull());
+ QCOMPARE(o->property("b").value<QObject*>(), o.data());
+}
+
QTEST_MAIN(tst_qqmllanguage)
#include "tst_qqmllanguage.moc"