aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2011-07-05 15:07:05 +1000
committerQt by Nokia <qt-info@nokia.com>2011-07-20 08:22:07 +0200
commit9b5f9c8056186c9cf3c40dbac66e5f90369339dc (patch)
tree3c6f6eeb0bcebe8a3c029ccc0c05d9cbf7c89801 /tests
parentc53f036492deeaf21b9e9c666efa901775bca4b3 (diff)
Refactor ListView and GridView implementations
Places common code into QSGItemView. Change-Id: Ic310dbe7e16774163ba393860da64a0da7d4ea0a Reviewed-on: http://codereview.qt.nokia.com/1200 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Bea Lam <bea.lam@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qsggridview/tst_qsggridview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/declarative/qsggridview/tst_qsggridview.cpp b/tests/auto/declarative/qsggridview/tst_qsggridview.cpp
index ab202e047f..5310632d98 100644
--- a/tests/auto/declarative/qsggridview/tst_qsggridview.cpp
+++ b/tests/auto/declarative/qsggridview/tst_qsggridview.cpp
@@ -1236,7 +1236,7 @@ void tst_QSGGridView::positionViewAtIndex()
// Position on an item that would leave empty space if positioned at the top
gridview->positionViewAtIndex(31, QSGGridView::Beginning);
QTRY_COMPARE(gridview->indexAt(120, 630), 31);
- QTRY_COMPARE(gridview->contentY(), 520.);
+ QTRY_COMPARE(gridview->contentY(), 521.); // 520 then +1 so bottom edge of last item is visible
// Confirm items positioned correctly
itemCount = findItems<QSGItem>(contentItem, "wrapper").count();
@@ -1354,7 +1354,7 @@ void tst_QSGGridView::positionViewAtIndex()
// positionViewAtEnd
gridview->positionViewAtEnd();
- QTRY_COMPARE(gridview->contentX(), 430.);
+ QTRY_COMPARE(gridview->contentX(), 400.); // 8*80 - 240 (8 columns)
gridview->setContentX(80);
canvas->rootObject()->setProperty("showFooter", true);