diff options
author | Sami Shalayel <sami.shalayel@qt.io> | 2022-10-11 11:41:13 +0200 |
---|---|---|
committer | Sami Shalayel <sami.shalayel@qt.io> | 2022-10-31 11:17:47 +0100 |
commit | 15d23885128d00b49f78fc43c4cc1080cc0f4520 (patch) | |
tree | cc4f64a91ac76ca3ce56a0429abd2204d2baeb32 /tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml | |
parent | 04d4f099d6008886f77d2d9f5449811757744dac (diff) |
qmltc: Remove broken alias optimization
Remove the recursive alias resolution mechanism. It tried to resolve
aliases recursively but only knew the id's of the current component.
This means that an alias pointing to a property defined in another
component (e.g. a different qml file) was resolved using the
id-to-scope map of the component containing the alias property.
This leads to unresolved aliases at best and endless loops when the
aliased property was itself an alias pointing to some property also
existing in the original component (see
QmltcTests/ComponentWithAlias{1..3}.qml for an example).
Also added the reproducer in the qmltc tests.
Fixes: QTBUG-107533
Fixes: QTBUG-107534
Change-Id: Idbf0cff3e45213bc7fbb4a98a9393c6754b00046
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 259ff52e64cd8725bfaa7330a33f8d36456e8b1a)
Diffstat (limited to 'tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml')
-rw-r--r-- | tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml b/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml new file mode 100644 index 0000000000..210cf1e159 --- /dev/null +++ b/tests/auto/qml/qmltc/QmltcTests/ComponentWithAlias1.qml @@ -0,0 +1,8 @@ +import QtQuick + +Item { + property alias setMe: firstComponent.setMe + ComponentWithAlias2 { + id: firstComponent + } +} |