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-08 06:57:47 (GMT)
commitcf23188de237009136fa1480ab8fd9e3ca364769 (patch)
tree046ea65ca27c985949555cef07ba8e2e26738a13 /tests/auto/declarative
parentb05a2394e13a12fcb2f7e3b766e0b37bb1163eb7 (diff)
downloadQt-cf23188de237009136fa1480ab8fd9e3ca364769.zip
Qt-cf23188de237009136fa1480ab8fd9e3ca364769.tar.gz
Qt-cf23188de237009136fa1480ab8fd9e3ca364769.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 (cherry picked from commit e7bebcf0c59368340df524db4a53ae2595d057d7)
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.