summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtreeview
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-05-07 17:35:58 +0200
committerOlivier Goffart <ogoffart@trolltech.com>2009-05-07 18:02:36 +0200
commit61bec93c12bdc2912b38264386af07f80c3c0272 (patch)
tree6a2059eef0804052794307de6e72e5f6981e1564 /tests/auto/qtreeview
parent36932e49769726a28a7ffbc3d5a11b4bffb9952f (diff)
Fix treeview test with some style
the skulpture style (from KDE) always set ScrollByPixel
Diffstat (limited to 'tests/auto/qtreeview')
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp
index c0244e6289..c4517d65a7 100644
--- a/tests/auto/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
@@ -2028,6 +2028,8 @@ void tst_QTreeView::scrollTo()
//
view.show();
+ view.setVerticalScrollMode(QAbstractItemView::ScrollPerItem); //some styles change that in Polish
+
view.resize(300, 200);
//view.verticalScrollBar()->setValue(0);
@@ -2040,6 +2042,7 @@ void tst_QTreeView::scrollTo()
QCOMPARE(view.verticalScrollBar()->value(), 5);
view.scrollTo(model.index(60, 60, QModelIndex()));
+
CHECK_VISIBLE(60,60);
view.scrollTo(model.index(60, 30, QModelIndex()));
CHECK_VISIBLE(60,30);
@@ -2915,7 +2918,7 @@ void tst_QTreeView::styleOptionViewItem()
delegate.count = 0;
view.showMaximized();
QTest::qWait(30);
- QVERIFY(delegate.count > 13);
+ QVERIFY(delegate.count >= 13);
}
class task174627_TreeView : public QTreeView