diff options
author | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-03-03 18:36:51 +0100 |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com> | 2015-03-22 16:20:10 +0000 |
commit | ae1c3eba3e7e11a9b1ab4d18792c82c9bb6e62de (patch) | |
tree | 0afbf5ed19f00a91ff8873ef52c190f50acc1436 /tests/auto/qml/qqmlitemmodels/data | |
parent | 226419514e9a05040e691ac84bae5e1fb5e5191a (diff) |
Remove QModelIndexList value type, use Array instead
We implement this by adding QModelIndexList to the
set of sequence types.
Change-Id: If7e0e88ab0c2916c2b65a926f8241549520d7391
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'tests/auto/qml/qqmlitemmodels/data')
-rw-r--r-- | tests/auto/qml/qqmlitemmodels/data/modelindexlist.qml | 27 |
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 } } |