aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitem2/data/resourcesProperty.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickitem2/data/resourcesProperty.qml')
-rw-r--r--tests/auto/quick/qquickitem2/data/resourcesProperty.qml23
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/auto/quick/qquickitem2/data/resourcesProperty.qml b/tests/auto/quick/qquickitem2/data/resourcesProperty.qml
index b8f18bb375..2c4c0aa5c1 100644
--- a/tests/auto/quick/qquickitem2/data/resourcesProperty.qml
+++ b/tests/auto/quick/qquickitem2/data/resourcesProperty.qml
@@ -8,14 +8,27 @@ Item {
property bool test3
property bool test4
property bool test5
+ property bool test6
Component.onCompleted: {
- test1 = (root.resources.length >= 3)
- test2 = root.resources[0] == item1
- test3 = root.resources[1] == item2
- test4 = root.resources[2] == item3
- test5 = root.resources[10] == null
+ test1 = (root.resources.length === 4)
+ test2 = root.resources[0] === item1
+ test3 = root.resources[1] === item2
+ test4 = root.resources[2] === item3
+ test5 = root.resources[3] === otherObject
+ test6 = root.resources[10] == null
}
+ //Resources can be used explicitly
resources: [ Item { id: item1 }, Item { id: item2 }, Item { id: item3 } ]
+
+ Item {
+ //Item in Data go the children property.
+ }
+
+ QtObject {
+ //Objects in Data which are not items are put in resources.
+ id: otherObject
+ objectName: "subObject";
+ }
}