ListView can freeze if flicked beyond its bounds.
authorMartin Jones <martin.jones@nokia.com>
Wed, 7 Mar 2012 05:26:33 +0000 (15:26 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 7 Mar 2012 07:42:21 +0000 (08:42 +0100)
commitb1a301884bb88ff62268437f436d6f0fc38efe2b
tree8278b5519a599d96dfdd85a755f746378eb43f45
parent22a53bcd69d39a5ea128d53231e9e51455a98cc4
ListView can freeze if flicked beyond its bounds.

If the delegate's size changes in componentComplete and all
items are flicked out of view, an incorrect jump calculation
in addVisibleItems() resulted in a new delegate being created
in the wrong position, and retriggering the jump calculation,
which resulted in a new delegate being created in the wrong
position, and retriggering the jump...

Also fixed currentItem visibility.

Change-Id: Iad5f211c4fc5eed9c009d51a0ce3b58181a7b36e
Reviewed-by: Bea Lam <bea.lam@nokia.com>
src/quick/items/qquickgridview.cpp
src/quick/items/qquicklistview.cpp
tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
tests/auto/quick/qquicklistview/data/flickBeyondBoundsBug.qml [new file with mode: 0644]
tests/auto/quick/qquicklistview/tst_qquicklistview.cpp