diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 11 |
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 b341e1bb80..51f797b05b 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -181,6 +181,7 @@ private slots: void registerElimination(); void registerPropagation(); void revisions(); + void scopeIdLookup(); void scopeObjectDestruction(); void scopeVsObject(); void sequenceToIterable(); @@ -3746,6 +3747,16 @@ void tst_QmlCppCodegen::revisions() QCOMPARE(o->property("gotten").toInt(), 5); } +void tst_QmlCppCodegen::scopeIdLookup() +{ + QQmlEngine engine; + QQmlComponent component(&engine, QUrl(u"qrc:/qt/qml/TestTypes/scopeIdLookup.qml"_s)); + QVERIFY2(!component.isError(), component.errorString().toUtf8()); + QScopedPointer<QObject> object(component.create()); + QVERIFY(!object.isNull()); + QCOMPARE(object->property("objectName").toString(), u"outer"_s); +} + void tst_QmlCppCodegen::scopeObjectDestruction() { QQmlEngine engine; |