aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-01-21 13:14:20 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-01-22 09:59:09 +0100
commit3747c02fe64fbf5496dc540402dddadb1fa33c12 (patch)
treea7e3639f7d43a33cf41c70b7974af1e0cff55ecb /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
parent3fc68053db3acd9f7bef23d3aef1f7ac874e73dc (diff)
QmlCompiler: Handle ID lookups of incomplete types correctly
Incomplete types are generally stored in some wrapper type. We cannot just assign to the accumulator. Also, we already know whether we have an ID lookup there. No need to determine it again. Pick-to: 6.2 6.3 Change-Id: I1f9fd9f147c44975df33fe862523987d8e711905 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r--tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
index f1fad344ab..1a63d28bf5 100644
--- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
+++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp
@@ -115,6 +115,7 @@ private slots:
void variantlist();
void popContextAfterRet();
void revisions();
+ void invisibleBase();
};
void tst_QmlCppCodegen::simpleBinding()
@@ -1727,6 +1728,16 @@ void tst_QmlCppCodegen::revisions()
QCOMPARE(o->property("gotten").toInt(), 5);
}
+void tst_QmlCppCodegen::invisibleBase()
+{
+ QQmlEngine engine;
+ QQmlComponent c(&engine, QUrl(u"qrc:/TestTypes/invisibleBase.qml"_qs));
+ QVERIFY2(c.isReady(), qPrintable(c.errorString()));
+ QScopedPointer<QObject> o(c.create());
+ QVERIFY(o);
+ QCOMPARE(qvariant_cast<QObject *>(o->property("n")), o.data());
+}
+
void tst_QmlCppCodegen::runInterpreted()
{
if (qEnvironmentVariableIsSet("QV4_FORCE_INTERPRETER"))