positionViewAtIndex can fail when positioned near end of list.
authorMartin Jones <martin.jones@nokia.com>
Fri, 21 Jan 2011 05:03:35 +0000 (15:03 +1000)
committerJason McDonald <jason.mcdonald@nokia.com>
Fri, 21 Jan 2011 14:34:33 +0000 (00:34 +1000)
commit3e2c918f1ceb24c58dfd11fb395d22d2a3ea93cc
tree3d1d7a4a6c44baba310945db6395c59bd553c737
parentdb66fddffaba466410590fd3205dbd1e5f7617f7
positionViewAtIndex can fail when positioned near end of list.

We positioned the view beyond the bounds, which in some cases resulted
in only one item being created.  Combined with a bug in the bounds
fixup very many items were created.

Task-number: QT-4441
Reviewed-by: Michael Brasser
(cherry picked from commit c3dd455b03a6c03011e2446f69fc262230e91639)
src/declarative/graphicsitems/qdeclarativeflickable.cpp
src/declarative/graphicsitems/qdeclarativegridview.cpp
src/declarative/graphicsitems/qdeclarativelistview.cpp
tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp