Allow view items to be preserved.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Wed, 28 Sep 2011 23:58:42 +0000 (09:58 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 12 Oct 2011 00:36:56 +0000 (02:36 +0200)
commitae623976b8920117e751448e2a65dab174731476
tree21c1e44764a77e50f4fc7202d000c0670692bdee
parent959778a2b750cbc211643929a6e85a8694d72891
Allow view items to be preserved.

Do not destroy items that are members of the VisualDataModel
persistedItems group when they are released by the view.

The create function on VisualDataGroup will return a reference to
an instantiated item within that group, any item returned by this
function is automatically added to the persistedItems group and can
be released by removing it from the group.  Uninstantiated items added
to the persistedItems group by any other means are not instantiated
until requested by a view or create.

Task-number: QTBUG-21518
Task-number: QTBUG-20854

Change-Id: I59554711208504c8f20a3ebe783bddab9b21a558
Reviewed-on: http://codereview.qt-project.org/5831
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
examples/declarative/modelviews/visualdatamodel/slideshow.qml [new file with mode: 0644]
src/declarative/items/qsgvisualdatamodel.cpp
src/declarative/items/qsgvisualdatamodel_p.h
src/declarative/util/qdeclarativelistcompositor.cpp
src/declarative/util/qdeclarativelistcompositor_p.h
tests/auto/declarative/qsgvisualdatamodel/data/create.qml [new file with mode: 0644]
tests/auto/declarative/qsgvisualdatamodel/tst_qsgvisualdatamodel.cpp