Cannot flick to the end of a horizontal ListView with LayoutMirroring
authorMartin Jones <martin.jones@nokia.com>
Thu, 13 Oct 2011 07:41:51 +0000 (17:41 +1000)
committerQt by Nokia <qt-info@nokia.com>
Sun, 16 Oct 2011 23:10:40 +0000 (01:10 +0200)
commit9bd6361400a2a4e4045a090de73d70082cc6d1bf
treee701a5232315c6be76943c93806c48e0dac49b90
parent063c08ab8230249ad01c1698ba243b9bb3b238e5
Cannot flick to the end of a horizontal ListView with LayoutMirroring

Forward port of fix for QTBUG-21756.
minXExtent calculated the offset due to highlight range incorrectly
(reversed) when mirroring enabled.  Also us same algorithm for fixup()
in GridView and ListView uses.

For QtQuick 2, this change also reverses the beginning and end highlight
range, as it should be, i.e. the preferredHighlightBegin is from the
right side in RightToLeft mode.  Also added snapping tests.

Task-number: QTBUG-21756
Change-Id: Ica0ba4ab5db0ce9c77f2da75e9f8293550bd37d1
Reviewed-by: Martin Jones <martin.jones@nokia.com>
doc/src/declarative/whatsnew.qdoc
src/declarative/items/qsggridview.cpp
src/declarative/items/qsgitemview.cpp
src/declarative/items/qsglistview.cpp
src/qtquick1/graphicsitems/qdeclarativegridview.cpp
src/qtquick1/graphicsitems/qdeclarativelistview.cpp
tests/auto/declarative/qsggridview/data/snapToRow.qml [new file with mode: 0644]
tests/auto/declarative/qsggridview/tst_qsggridview.cpp
tests/auto/declarative/qsglistview/data/snapToItem.qml [new file with mode: 0644]
tests/auto/declarative/qsglistview/tst_qsglistview.cpp