aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index eab0a70abd..824ad72601 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -139,6 +139,7 @@ private slots:
void interestingFiles_data();
void internalConversion();
void invalidPropertyType();
+ void invalidateCompositeType();
void invisibleBase();
void invisibleListElementType();
void invisibleSingleton();
@@ -2653,6 +2654,25 @@ void tst_QmlCppCodegen::invalidPropertyType()
QVERIFY(myCppType->useListDelegate());
}
+void tst_QmlCppCodegen::invalidateCompositeType()
+{
+ for (int i = 0; i < 3; ++i) {
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/invalidateCompositeType.qml"_s));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(o);
+
+ QObject *d = o->property("d").value<QObject *>();
+ QVERIFY(d);
+ QCOMPARE(o->property("d2").value<QObject *>(), d);
+
+ QObject *group = d->property("child2").value<QObject *>();
+ QVERIFY(group);
+ QCOMPARE(o->property("d3").value<QObject *>(), group);
+ }
+}
+
void tst_QmlCppCodegen::invisibleBase()
{
QQmlEngine engine;