Update ListModel's internal indexes when items are inserted/removed.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Wed, 27 Jul 2011 07:54:04 +0000 (17:54 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 28 Jul 2011 02:34:22 +0000 (04:34 +0200)
commit44e201c04e699f3bee49f63894477f5105092cb0
treea205f0222e167338ef68087b20f0585639fc5ebc
parent945aba32800d5a22fa01694a81d4dfe2c23e853a
Update ListModel's internal indexes when items are inserted/removed.

The changed signals of cached items were being emitted with
incorrect indexes if a previous item in the list was inserted or
removed, resulting in changes not being reflected in views.

Task-number: QTBUG-20286
Change-Id: Id2fb8e2875c6cbd4f2e4d14ef859b7a7a4bac8d9
Reviewed-on: http://codereview.qt.nokia.com/2252
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Bea Lam <bea.lam@nokia.com>
src/declarative/util/qdeclarativelistmodel.cpp
tests/auto/declarative/qdeclarativelistmodel/tst_qdeclarativelistmodel.cpp