prepareTransition() must cancel current transition
authorBea Lam <bea.lam@nokia.com>
Mon, 5 Mar 2012 23:28:56 +0000 (09:28 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 7 Mar 2012 01:45:21 +0000 (02:45 +0100)
commit14e00670b7393dd16e8896b2365e6d0c154c2d9a
treef9893acf86f8c5af41bd36271d12a296f16902cc
parent4b2a7b063bd8a75dd10859d477e53c833fc844fa
prepareTransition() must cancel current transition

If it does not, itemX() or itemY() will still return the current
transition's 'to' position instead of the nextTransitionTo pos that was
scheduled for the next transition (which the item now has moved to
using the direct setPos() method).

Also refactor prepareTransition() to always move the item directly to
the nextTransitionTo if transition is not going ahead.

Also fix some broken test code.

Task-number: QTBUG-24523
Change-Id: I2e536fbc0da2acbf96fdf2d177190a8968f7fdb1
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/quick/items/qquickitemviewtransition.cpp
tests/auto/quick/qquickgridview/data/multipleTransitions.qml
tests/auto/quick/qquickgridview/tst_qquickgridview.cpp
tests/auto/quick/qquicklistview/data/multipleTransitions.qml
tests/auto/quick/qquicklistview/tst_qquicklistview.cpp