Fix searchs for insert positions in QDeclarativeListCompositor.
authorAndrew den Exter <andrew.den-exter@nokia.com>
Fri, 25 Nov 2011 03:33:09 +0000 (13:33 +1000)
committerQt by Nokia <qt-info@nokia.com>
Fri, 25 Nov 2011 07:10:20 +0000 (08:10 +0100)
commit900137ea6a593f612e091cf629fc3a0ec929fb5f
treedec5a458f88591766375d9f6fd0fcee10355ddd7
parent4ffa4881a8e7a8da85029aaf834aadca9ede0b91
Fix searchs for insert positions in QDeclarativeListCompositor.

When scanning for a start range don't stop on ranges that don't
have an group flags unless that range is the terminal range.
This fixes a couple of issues where moving an item to the end
of the list would position it after a prepend only range instead
of before it, or would miscalculate the iterator offset resulting
in invalid indexes in the insert range.

Change-Id: Ic4aa001edf43ec86a65d432cd8f80abf0b44d276
Reviewed-by: Martin Jones <martin.jones@nokia.com>
src/declarative/util/qdeclarativelistcompositor.cpp
tests/auto/declarative/qdeclarativelistcompositor/tst_qdeclarativelistcompositor.cpp