diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2023-06-23 11:02:18 +0200 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-06-23 18:49:37 +0000 |
| commit | 779f6cf08c1bcb9d54a4e75c81a63689edab2df4 (patch) | |
| tree | 11d9a6e57184cd655067fbc0cf85dbc73b483a1a /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | c91b718637bf8f6f26ede6a53d8a4763a3214ca1 (diff) | |
QmlCompiler: Add further tests for DTZ
Apparently we had some intermediate state where these ones were broken.
Let's make sure this doesn't happen again.
Pick-to: 6.6
Fixes: QTBUG-113403
Change-Id: If1da8200afe5c7cee417cd755a15251979fb18c5
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.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index db9701d033..2ccd104ed9 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -42,6 +42,7 @@ private slots: void attachedType(); void badSequence(); void basicBlocksWithBackJump(); + void basicDTZ(); void bindToValueType(); void bindingExpression(); void blockComments(); @@ -735,6 +736,23 @@ void tst_QmlCppCodegen::basicBlocksWithBackJump() QVERIFY(!expectingMessage); } +void tst_QmlCppCodegen::basicDTZ() +{ + QQmlEngine engine; + QQmlComponent component(&engine, QUrl(u"qrc:/qt/qml/TestTypes/basicDTZ.qml"_s)); + QVERIFY2(component.isReady(), qPrintable(component.errorString())); + QScopedPointer<QObject> o(component.create()); + QVERIFY(!o.isNull()); + + QCOMPARE(o->property("title").toString(), u"none"); + + QMetaObject::invokeMethod(o.data(), "t1"); + QMetaObject::invokeMethod(o.data(), "t2"); + QMetaObject::invokeMethod(o.data(), "t3"); + + QCOMPARE(o->property("title").toString(), u"Baz 41"); +} + void tst_QmlCppCodegen::bindToValueType() { QQmlEngine engine; |
