summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtableview
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-18 10:31:31 +0200
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2009-08-18 10:36:24 +0200
commitb120ff4f1a479c35b3e5bbcbc3c72cc18ee4879c (patch)
treeeec0b4e5ed154415dba945a5da30444d557419b1 /tests/auto/qtableview
parent9b7a6b231014135d7df0f3675d121c2d76d89e76 (diff)
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 2f41d774d6..e650dc862e 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