Backport PathView currentIndex fixes from Qt 5
authorBea Lam <bea.lam@jollamobile.com>
Tue, 11 Dec 2012 07:25:44 +0000 (17:25 +1000)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 12 Dec 2012 06:47:54 +0000 (07:47 +0100)
commit5d439d751267c64408bd27ab0e6548822146a35c
treec68135a92698fe9846f59885719dd3002b1f865c
parentff2f41bd14cdfd14da91ae1b66dc6e679a41936e
Backport PathView currentIndex fixes from Qt 5

Backport 447e5acb880ebda498891623dc4009984cb73bc6 and
0fc361f96b06ba318e70610e46beb421753cae9d which fix bugs related
to currentIndex. The first commit ensures currentIndex=0 when all
items are removed; the second ensures that the initial currentIndex
value is respected and also resets the view correctly if the model
changes.

Change-Id: I73266a211001a54163be8415d449802ff077a72e
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
src/declarative/graphicsitems/qdeclarativepathview.cpp
tests/auto/declarative/qdeclarativepathview/data/initialCurrentIndex.qml [new file with mode: 0644]
tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp