aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/data
diff options
context:
space:
mode:
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
-rw-r--r--tests/auto/qml/qqmllanguage/data/thisInQmlScope.qml13
3 files changed, 43 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
+ }
+}
diff --git a/tests/auto/qml/qqmllanguage/data/thisInQmlScope.qml b/tests/auto/qml/qqmllanguage/data/thisInQmlScope.qml
index e3c99e70e1..9ff758c33f 100644
--- a/tests/auto/qml/qqmllanguage/data/thisInQmlScope.qml
+++ b/tests/auto/qml/qqmllanguage/data/thisInQmlScope.qml
@@ -6,5 +6,18 @@ QtObject {
y = this.x;
}
property var f: g
+
Component.onCompleted: f()
+
+ property int a: 42
+ property int b: 0
+ function g_subobj(){
+ b = this.a;
+ }
+ property var f_subobj: g_subobj
+
+ property QtObject subObject: QtObject {
+ property int a: 100
+ Component.onCompleted: f_subobj()
+ }
}