aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2019-03-20 14:27:13 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2019-03-20 15:11:12 +0000
commit40ae0bfd9977e53a87384d79ae971a7ded260a12 (patch)
treee3fb0574e7be1f42770de0088c94dbbd49cd6f83 /tests/auto/qml/qqmllanguage/data
parent78a2887d8c5d866fc430f197abea6bb31293c4b1 (diff)
Add test for dynamic anchors to parents in PropertyChanges
Fixes: QTBUG-71042 Change-Id: I4d0927b0d6c9a4ccaaddfbfd6dd2a7841fbbc845 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmllanguage/data')
-rw-r--r--tests/auto/qml/qqmllanguage/data/EdgeObject.qml20
-rw-r--r--tests/auto/qml/qqmllanguage/data/anchorsToParentInPropertyChagnes.qml10
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/EdgeObject.qml b/tests/auto/qml/qqmllanguage/data/EdgeObject.qml
new file mode 100644
index 0000000000..b25dc29c49
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/EdgeObject.qml
@@ -0,0 +1,20 @@
+import QtQuick 2.0
+
+Item {
+ property int edgeWidth: bg.width
+
+ Rectangle {
+ id: bg
+ }
+
+ states: [
+ State {
+ when: 1 === 1
+ PropertyChanges {
+ target: bg
+ anchors.left: parent.left
+ anchors.right: parent.right
+ }
+ }
+ ]
+}
diff --git a/tests/auto/qml/qqmllanguage/data/anchorsToParentInPropertyChagnes.qml b/tests/auto/qml/qqmllanguage/data/anchorsToParentInPropertyChagnes.qml
new file mode 100644
index 0000000000..8b1682da92
--- /dev/null
+++ b/tests/auto/qml/qqmllanguage/data/anchorsToParentInPropertyChagnes.qml
@@ -0,0 +1,10 @@
+import QtQuick 2.9
+
+Item {
+ width: 200
+ property int edgeWidth: edge.edgeWidth
+ EdgeObject {
+ id: edge
+ anchors.fill: parent
+ }
+}