aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2021-08-25 12:54:43 +0200
committerUlf Hermann <ulf.hermann@qt.io>2021-10-28 17:49:52 +0200
commit9b2ba45c1886ee88e856f49acb6b4e2ddb983421 (patch)
tree58ce88e083c81fc94c661784672667902483f124 /tests/auto/qml/qqmlecmascript/data
parent2fb875e8e83366eddc5d156be10f409fd19ae922 (diff)
Allow ImmediatePropertyNames in addition to DeferredPropertyNames
If given, all properties but the ones mentioned in ImmediatePropertyNames are deferred. Also add some warnings related to DeferredPropertyNames being ignored in some cases. Finally, scanObject() can return false now. Therefore adapt its caller to take that into account. Task-number: QTBUG-95117 Change-Id: I1e696228de7ad3b495bf7791fdb014768aff4c96 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'tests/auto/qml/qqmlecmascript/data')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/ObjectWithId.qml3
-rw-r--r--tests/auto/qml/qqmlecmascript/data/brokenImmediateDeferred.qml2
-rw-r--r--tests/auto/qml/qqmlecmascript/data/brokenImmediateId.qml5
-rw-r--r--tests/auto/qml/qqmlecmascript/data/immediateDerived.qml7
-rw-r--r--tests/auto/qml/qqmlecmascript/data/immediateProperties.qml11
5 files changed, 28 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/ObjectWithId.qml b/tests/auto/qml/qqmlecmascript/data/ObjectWithId.qml
new file mode 100644
index 0000000000..581e56b8ee
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/ObjectWithId.qml
@@ -0,0 +1,3 @@
+import Qt.test
+
+MyQmlObject { id: invisibleId }
diff --git a/tests/auto/qml/qqmlecmascript/data/brokenImmediateDeferred.qml b/tests/auto/qml/qqmlecmascript/data/brokenImmediateDeferred.qml
new file mode 100644
index 0000000000..852b75533c
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/brokenImmediateDeferred.qml
@@ -0,0 +1,2 @@
+import Qt.test
+BrokenImmediateDeferred {}
diff --git a/tests/auto/qml/qqmlecmascript/data/brokenImmediateId.qml b/tests/auto/qml/qqmlecmascript/data/brokenImmediateId.qml
new file mode 100644
index 0000000000..9a1566d68d
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/brokenImmediateId.qml
@@ -0,0 +1,5 @@
+import Qt.test
+
+MyImmediateObject {
+ objectProperty: MyQmlObject { id: wrong }
+}
diff --git a/tests/auto/qml/qqmlecmascript/data/immediateDerived.qml b/tests/auto/qml/qqmlecmascript/data/immediateDerived.qml
new file mode 100644
index 0000000000..e1dd36e5d9
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/immediateDerived.qml
@@ -0,0 +1,7 @@
+import Qt.test
+
+DerivedFromImmediate {
+ objectName: "derived"
+ value: 11
+ value2: 20
+}
diff --git a/tests/auto/qml/qqmlecmascript/data/immediateProperties.qml b/tests/auto/qml/qqmlecmascript/data/immediateProperties.qml
new file mode 100644
index 0000000000..a1bb60ac99
--- /dev/null
+++ b/tests/auto/qml/qqmlecmascript/data/immediateProperties.qml
@@ -0,0 +1,11 @@
+import Qt.test
+
+MyImmediateObject {
+ id: root
+ objectName: "immediate"
+ value: 10
+ objectProperty: MyQmlObject {
+ value: root.value
+ }
+ objectProperty2: ObjectWithId {}
+}