diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-09-17 13:29:23 (GMT) |
---|---|---|
committer | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-09-17 13:35:49 (GMT) |
commit | 67d3086c6aa1cfd1579a8230a0b2b94fff3735f3 (patch) | |
tree | 160f0692c28f12747097172527e7e0934e0e84e1 /tests/auto/qtableview | |
parent | deb322f3f358b0e596720f85361a0e7077137530 (diff) | |
download | Qt-67d3086c6aa1cfd1579a8230a0b2b94fff3735f3.zip Qt-67d3086c6aa1cfd1579a8230a0b2b94fff3735f3.tar.gz Qt-67d3086c6aa1cfd1579a8230a0b2b94fff3735f3.tar.bz2 |
Fix the scrollTo() test function on Windows.
After the QTRY_COMPARE was added, the size of the view suddenly
became a hard requirement. However, this reqirement was not met on
windows, since the forcedSize was smaller than the minimum size allowed
for the view.
Thus, it would never have its size set to forcedSize and the
QTRY_COMPARE would fail.
Diffstat (limited to 'tests/auto/qtableview')
-rw-r--r-- | tests/auto/qtableview/tst_qtableview.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp index 48fcb3e..964841e 100644 --- a/tests/auto/qtableview/tst_qtableview.cpp +++ b/tests/auto/qtableview/tst_qtableview.cpp @@ -2279,7 +2279,7 @@ void tst_QTableView::scrollTo_data() << (int)QAbstractItemView::ScrollPerItem << (int)QAbstractItemView::ScrollPerItem << 10 << 10 // table - << 40 << 40 // size + << 80 << 80 // size << -1 << -1 // hide << 0 << 0 // cell << 1 << 1 // span @@ -2291,7 +2291,7 @@ void tst_QTableView::scrollTo_data() << (int)QAbstractItemView::ScrollPerPixel << (int)QAbstractItemView::ScrollPerPixel << 10 << 10 // table - << 40 << 40 // size + << 80 << 80 // size << -1 << -1 // hide << 0 << 0 // cell << 1 << 1 // span @@ -2303,7 +2303,7 @@ void tst_QTableView::scrollTo_data() << (int)QAbstractItemView::ScrollPerItem << (int)QAbstractItemView::ScrollPerItem << 10 << 10 // table - << 40 << 40 // size + << 80 << 80 // size << 3 << 3 // hide << 5 << 5 // cell << 1 << 1 // span @@ -2336,7 +2336,8 @@ void tst_QTableView::scrollTo() QtTestTableView view; view.show(); - QSize forcedSize(columnWidth * 2, rowHeight * 2); + // resizing to this size will ensure that there can ONLY_BE_ONE_CELL inside the view. + QSize forcedSize(columnWidth*2, rowHeight * 2); view.resize(forcedSize); QTest::qWait(0); QTRY_COMPARE(view.size(), forcedSize); @@ -2362,6 +2363,8 @@ void tst_QTableView::scrollTo() view.scrollTo(index, (QAbstractItemView::ScrollHint)scrollHint); QCOMPARE(view.verticalScrollBar()->value(), expectedVerticalScroll); QCOMPARE(view.horizontalScrollBar()->value(), expectedHorizontalScroll); + + //QTest::qWait(22100); // ### needed to pass the test } void tst_QTableView::indexAt_data() |