aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2022-12-15 16:47:27 +0100
committerUlf Hermann <ulf.hermann@qt.io>2022-12-17 02:45:33 +0100
commite9b7eaaf6e627c84cf77dc0ea76c9cb40d705711 (patch)
treeb0fc412c1311efdf6539c21ce251bbb810956dc5 /tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
parent9ea0b225372f6b9104ff330364a81aee2855e3f2 (diff)
QML: Consider deep aliases when finding binding targets
If we have a deep alias we need to bind to the inner object rather than the outer one. Fixes: QTBUG-109417 Pick-to: 6.5 6.2 Change-Id: Iefe8641026cfbbf9199b2bb8d9fa2f5fba591f17 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index 948b3b1bc3..efe89f61ac 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -2286,6 +2286,16 @@ void tst_qqmllanguage::aliasProperties()
QQmlComponent component(&engine, testFileUrl("alias.18.qml"));
VERIFY_ERRORS("alias.18.errors.txt");
}
+
+ // Binding on deep alias
+ {
+ QQmlComponent component(&engine, testFileUrl("alias.19.qml"));
+ VERIFY_ERRORS(0);
+
+ QScopedPointer<QObject> object(component.create());
+ QVERIFY(!object.isNull());
+ QCOMPARE(object->property("height").toInt(), 960);
+ }
}
// QTBUG-13374 Test that alias properties and signals can coexist