Views do not notify count changes properly
authorMartin Jones <martin.jones@nokia.com>
Thu, 5 May 2011 04:18:28 +0000 (14:18 +1000)
committerMartin Jones <martin.jones@nokia.com>
Mon, 30 May 2011 05:48:55 +0000 (15:48 +1000)
commitd91e311ab7de4f2ae4ab147e5dbb8d914c5316da
tree0e758e36dbb727880bf93f48dc6d8cb157b05574
parentd58472c1b1727b5695c692ab8e99545b5b6c1158
Views do not notify count changes properly

The views don't have a valid count until both a model and a delegate
are provided.  But, countChanged() is not called when a delegate is
set after the model, so bindings to count were not evaluated.  Also
test that count is updated for insertion/removal

Change-Id: Ic82039a624c02f0bdb2862ac7a6e215df75bb314
Task-number: QTBUG-19037
Reviewed-by: Bea Lam
(cherry picked from commit 4fbcb6a531bf424a8dbbbd0ca2947d9e15118885)
src/declarative/graphicsitems/qdeclarativegridview.cpp
src/declarative/graphicsitems/qdeclarativelistview.cpp
src/declarative/graphicsitems/qdeclarativepathview.cpp
tests/auto/declarative/qdeclarativegridview/data/gridview1.qml
tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
tests/auto/declarative/qdeclarativelistview/data/listviewtest.qml
tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
tests/auto/declarative/qdeclarativepathview/data/datamodel.qml
tests/auto/declarative/qdeclarativepathview/data/pathview0.qml
tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp