Fix crash when items are moved in model.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Tue, 13 Dec 2011 07:17:56 +0000 (17:17 +1000)
committerQt by Nokia <qt-info@nokia.com>
Wed, 14 Dec 2011 03:57:30 +0000 (04:57 +0100)
commit13eb07b3a63d53abcabfa60659fd829051db66a3
tree240855ed20e16aff046bee7d7808fbf4452d2710
parentfe52727baea9986882461e2ea15e9e64b96e4c61
Fix crash when items are moved in model.

When erasing an item we need to backtrack to the previous item so the
next iteration doesn't skip an item. In the worst case the next item
is the last and a failure to backtrack will cause the loop to wrap
around and run over the list again.

Task-number: QTBUG-23107
Change-Id: I82156f6fc1f7973ba11f09a4694230c77c293757
Reviewed-by: Bea Lam <bea.lam@nokia.com>
src/quick/util/qdeclarativelistcompositor.cpp
tests/auto/declarative/qdeclarativelistcompositor/tst_qdeclarativelistcompositor.cpp