summaryrefslogtreecommitdiffstats
path: root/tests/auto/qtreeview
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-04-16 10:03:13 (GMT)
committerJason McDonald <jason.mcdonald@nokia.com>2009-04-16 10:03:13 (GMT)
commit5427eb07a1a87861fd321378710e77d96e92ccbd (patch)
tree0a3bcaa60aeccc114a68f67ca682debfb7b5417f /tests/auto/qtreeview
parent2412e3c0fedb4eba5fecffb23c3b9a31ad803ea0 (diff)
parent049f9e85b6ca50ccc53596160ebe4a5fe3de3f80 (diff)
downloadQt-5427eb07a1a87861fd321378710e77d96e92ccbd.zip
Qt-5427eb07a1a87861fd321378710e77d96e92ccbd.tar.gz
Qt-5427eb07a1a87861fd321378710e77d96e92ccbd.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'tests/auto/qtreeview')
-rw-r--r--tests/auto/qtreeview/tst_qtreeview.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp
index d9296ad..655ea4e 100644
--- a/tests/auto/qtreeview/tst_qtreeview.cpp
+++ b/tests/auto/qtreeview/tst_qtreeview.cpp
@@ -1674,9 +1674,16 @@ void tst_QTreeView::moveCursor()
view.setColumnHidden(0, true);
QVERIFY(view.isColumnHidden(0));
view.show();
+ qApp->setActiveWindow(&view);
- QModelIndex actual = view.moveCursor(PublicView::MoveDown, Qt::NoModifier);
+ //here the first visible index should be selected
+ //because the view got the focus
QModelIndex expected = model.index(1, 1, QModelIndex());
+ QCOMPARE(view.currentIndex(), expected);
+
+ //then pressing down should go to the next line
+ QModelIndex actual = view.moveCursor(PublicView::MoveDown, Qt::NoModifier);
+ expected = model.index(2, 1, QModelIndex());
QCOMPARE(actual, expected);
view.setRowHidden(0, QModelIndex(), false);