ObjectModel: add API for dynamic changes
authorJ-P Nurmi <jpnurmi@theqtcompany.com>
Mon, 18 May 2015 15:37:19 +0000 (17:37 +0200)
committerJ-P Nurmi <jpnurmi@theqtcompany.com>
Wed, 10 Jun 2015 06:56:18 +0000 (06:56 +0000)
commiteb7db5934b453eea2946ed7ae9a188c44467cf23
treebeca3748a6fab9dadd4c4cb9d191f8c146e070b4
parentf12c07216e25f9a326000e45583b9d5216945ee7
ObjectModel: add API for dynamic changes

Following the ListModel API:
- object get(index)
- append(object)
- insert(int index, object)
- move(int from, int to, int n)
- remove(int index, int n)

[ChangeLog][QtQml][ObjectModel] Added get(), append(), insert(), move()
and remove() methods.

Change-Id: I592e55b7c4c933a1100191bf5a9405944b347172
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
src/qml/types/qqmlmodelsmodule.cpp
src/qml/types/qqmlobjectmodel.cpp
src/qml/types/qqmlobjectmodel_p.h
tests/auto/qml/qml.pro
tests/auto/qml/qqmlobjectmodel/qqmlobjectmodel.pro [new file with mode: 0644]
tests/auto/qml/qqmlobjectmodel/tst_qqmlobjectmodel.cpp [new file with mode: 0644]
tests/auto/qmltest/objectmodel/tst_objectmodel.qml [new file with mode: 0644]
tests/auto/quick/qquicklistview/data/objectmodel.qml [new file with mode: 0644]
tests/auto/quick/qquicklistview/tst_qquicklistview.cpp
tests/auto/quick/qquickrepeater/data/objectmodel.qml [new file with mode: 0644]
tests/auto/quick/qquickrepeater/tst_qquickrepeater.cpp