summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtableview
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-18 08:31:31 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-18 08:36:24 (GMT)
commitb120ff4f1a479c35b3e5bbcbc3c72cc18ee4879c (patch)
treeeec0b4e5ed154415dba945a5da30444d557419b1 /tests/auto/qtableview
parent9b7a6b231014135d7df0f3675d121c2d76d89e76 (diff)
downloadQt-b120ff4f1a479c35b3e5bbcbc3c72cc18ee4879c.zip
Qt-b120ff4f1a479c35b3e5bbcbc3c72cc18ee4879c.tar.gz
Qt-b120ff4f1a479c35b3e5bbcbc3c72cc18ee4879c.tar.bz2
tst_QTableView::task259308_scrollVerticalHeaderSwappedSections fails.
The QTableView scrolled down after the sections swap. Setting the current index to the topmost visual element fixes the issue. Reviewed-by: Thierry
Diffstat (limited to 'tests/auto/qtableview')
-rw-r--r--tests/auto/qtableview/tst_qtableview.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qtableview/tst_qtableview.cpp b/tests/auto/qtableview/tst_qtableview.cpp
index 2f41d77..e650dc8 100644
--- a/tests/auto/qtableview/tst_qtableview.cpp
+++ b/tests/auto/qtableview/tst_qtableview.cpp
@@ -3270,6 +3270,7 @@ void tst_QTableView::task259308_scrollVerticalHeaderSwappedSections()
tv.setModel(&model);
tv.show();
tv.verticalHeader()->swapSections(0, model.rowCount() - 1);
+ tv.setCurrentIndex(model.index(model.rowCount() - 1, 0));
QTest::qWait(60);
QTest::keyClick(&tv, Qt::Key_PageUp); // PageUp won't scroll when at top