Views do not notify count changes properly
authorMartin Jones <martin.jones@nokia.com>
Thu, 5 May 2011 04:18:28 +0000 (14:18 +1000)
committerOlivier Goffart <olivier.goffart@nokia.com>
Wed, 11 May 2011 15:00:06 +0000 (17:00 +0200)
commitbc83e44dc31cf4688d9b10d0540e61f5d0e37cdc
tree29663e6110763c7d1822ffde1ab21569711f951f
parentdb49ce3f88653fffd6aa967a7acd73058ba1f214
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