diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2022-12-15 16:47:27 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2022-12-22 11:00:49 +0100 |
commit | 75ec5421c07b5f56f21504a15f0f069bd375728c (patch) | |
tree | 28b27e46c1335d6bfbda3e96b91722be47806e13 /tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | |
parent | 5ccfea3bf01a598a4ec3f859cafeeffab46f780d (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
Change-Id: Iefe8641026cfbbf9199b2bb8d9fa2f5fba591f17
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit e9b7eaaf6e627c84cf77dc0ea76c9cb40d705711)
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r-- | tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp | 10 |
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 06b2738c9e..047df2f6d0 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -2257,6 +2257,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 |