aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml')
-rw-r--r--tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml27
1 files changed, 18 insertions, 9 deletions
diff --git a/tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml b/tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml
index 44393392d3..389c5daaf5 100644
--- a/tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml
+++ b/tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml
@@ -1,21 +1,30 @@
import Test 1.0
ItemModelsTest {
- property var modelIndexList
property int count
+ property var modelIndexListCopy
+ property var modelIndexListRead
+ property var modelIndexListBinding: modelIndexList
+ property bool varPropIsArray
+ property bool varIsArray
+ property bool propIsArray
onModelChanged: {
- modelIndexList = createModelIndexList()
- modelIndexList.prepend(model.index(0, 0))
- modelIndexList.append(model.index(1, 1))
+ var jsModelIndexList = []
for (var i = 0; i < 3; i++)
- modelIndexList.insert(i, model.index(2 + i, 2 + i))
+ jsModelIndexList.push(model.index(2 + i, 2 + i))
+ jsModelIndexList.push("Hi Bronsky!")
+ modelIndex = jsModelIndexList[0]
count = modelIndexList.length
- modelIndex = modelIndexList.at(0)
+ propIsArray = modelIndexList instanceof Array
+ modelIndexList = jsModelIndexList
+ modelIndexListRead = modelIndexList
- modelIndexList.removeAt(3)
- modelIndexList.removeFirst()
- modelIndexList.removeLast()
+ modelIndexListCopy = someModelIndexList()
+ varPropIsArray = modelIndexListCopy instanceof Array
+
+ jsModelIndexList = someModelIndexList()
+ varIsArray = jsModelIndexList instanceof Array
}
}