summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2011-07-04 00:08:15 (GMT)
committerMartin Jones <martin.jones@nokia.com>2011-07-04 00:08:15 (GMT)
commite7bebcf0c59368340df524db4a53ae2595d057d7 (patch)
tree2786c28b05f6a6a29fede3a4617a433ec4b21687 /tests/auto/declarative
parent8fbb802fa50d0a01c9c01d007a3e016c45fa863c (diff)
downloadQt-e7bebcf0c59368340df524db4a53ae2595d057d7.zip
Qt-e7bebcf0c59368340df524db4a53ae2595d057d7.tar.gz
Qt-e7bebcf0c59368340df524db4a53ae2595d057d7.tar.bz2
Flicking behaviour of ListView/GridView SnapOnItem is inconsistent
Improve the response of the views when SnapOneItem/Row is enabled. In this case it is best to be much more reactive to the user input since even a small movement in a particular direction indicates a change to the next/previous item. Change-Id: I6a8eb689c3b12cdc67f24106032e36bba82d2846 Task-number: QTBUG-19874 Reviewed-by: Bea Lam
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
index e3f7980..4342ff3 100644
--- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
+++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
@@ -450,12 +450,12 @@ void tst_QDeclarativeGridView::removed()
model.removeItem(1);
// Confirm items positioned correctly
- for (int i = 6; i < 18; ++i) {
+ for (int i = 3; i < 15; ++i) {
QDeclarativeItem *item = findItem<QDeclarativeItem>(contentItem, "wrapper", i);
if (!item) qWarning() << "Item" << i << "not found";
QTRY_VERIFY(item);
- QTRY_VERIFY(item->x() == (i%3)*80);
- QTRY_VERIFY(item->y() == (i/3)*60);
+ QTRY_COMPARE(item->x(), (i%3)*80.0);
+ QTRY_COMPARE(item->y(), 60+(i/3)*60.0);
}
// Remove currentIndex
@@ -476,7 +476,7 @@ void tst_QDeclarativeGridView::removed()
if (!item) qWarning() << "Item" << i << "not found";
QTRY_VERIFY(item);
QTRY_VERIFY(item->x() == (i%3)*80);
- QTRY_VERIFY(item->y() == (i/3)*60);
+ QTRY_VERIFY(item->y() == 60+(i/3)*60);
}
// remove item outside current view.