diff options
| author | Ulf Hermann <ulf.hermann@qt.io> | 2023-12-06 16:22:22 +0100 |
|---|---|---|
| committer | Ulf Hermann <ulf.hermann@qt.io> | 2023-12-07 12:54:37 +0100 |
| commit | 9f8193b65b0302854068b69bc1c9a46de2eb0a36 (patch) | |
| tree | 3140930f9aa45602d336ab364a239861d63e7ccc /tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | |
| parent | 4c1b7104afec189ca9280611e781d8e10e9959e2 (diff) | |
QmlCompiler: Do not adjust renames
A rename always produces a register with exactly one tracked type, but
we do not want to use it as base for the type adjustments. We want to
adjust based on the original location and its readers (which includes
any renames).
Pick-to: 6.6 6.5
Change-Id: Iaefdf56992c7c101a35a056fb93c49ade5ccf393
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp')
| -rw-r--r-- | tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp index 70a064cb83..0b86932014 100644 --- a/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp +++ b/tests/auto/qml/qmlcppcodegen/tst_qmlcppcodegen.cpp @@ -180,6 +180,7 @@ private slots: void readEnumFromInstance(); void registerElimination(); void registerPropagation(); + void renameAdjust(); void revisions(); void scopeIdLookup(); void scopeObjectDestruction(); @@ -3736,6 +3737,19 @@ void tst_QmlCppCodegen::registerPropagation() QCOMPARE(undefined, u"undefined"_s); } +void tst_QmlCppCodegen::renameAdjust() +{ + QQmlEngine engine; + QQmlComponent c(&engine, QUrl(u"qrc:/qt/qml/TestTypes/renameAdjust.qml"_s)); + QVERIFY2(c.isReady(), qPrintable(c.errorString())); + + QTest::ignoreMessage(QtDebugMsg, "success"); + QTest::ignoreMessage(QtCriticalMsg, "failed 10 11"); + + QScopedPointer<QObject> o(c.create()); + QVERIFY(o); +} + void tst_QmlCppCodegen::revisions() { QQmlEngine engine; |
