diff options
author | Pierre Rossi <pierre.rossi@nokia.com> | 2009-10-19 19:37:45 (GMT) |
---|---|---|
committer | Pierre Rossi <pierre.rossi@nokia.com> | 2009-10-19 19:56:21 (GMT) |
commit | 93550050f4fe4f411bfbd80d7b30ff5bc8a20df7 (patch) | |
tree | 5a7642840c473dd94c396731aea8f5d0a14e5614 /tests | |
parent | 2633931653757decd93dd3939c09f5e07203da1c (diff) | |
download | Qt-93550050f4fe4f411bfbd80d7b30ff5bc8a20df7.zip Qt-93550050f4fe4f411bfbd80d7b30ff5bc8a20df7.tar.gz Qt-93550050f4fe4f411bfbd80d7b30ff5bc8a20df7.tar.bz2 |
add the autotest for the QListView::setModelColumn bug
sha1 of the fix: 2633931653757decd93dd3939c09f5e07203da1c
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qlistview/tst_qlistview.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 7599ce6a06..3ee6889 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -116,6 +116,7 @@ private slots: void keyboardSearch(); void shiftSelectionWithNonUniformItemSizes(); void clickOnViewportClearsSelection(); + void task262152_setModelColumnNavigate(); }; // Testing get/set functions @@ -1767,6 +1768,29 @@ void tst_QListView::clickOnViewportClearsSelection() } +void tst_QListView::task262152_setModelColumnNavigate() +{ + QListView view; + QStandardItemModel model(3,2); + model.setItem(0,1,new QStandardItem("[0,1]")); + model.setItem(1,1,new QStandardItem("[1,1]")); + model.setItem(2,1,new QStandardItem("[2,1]")); + + view.setModel(&model); + view.setModelColumn(1); + + view.show(); + QTest::qWait(30); + QTest::keyClick(&view, Qt::Key_Down); + QTest::qWait(10); + QCOMPARE(view.currentIndex(), model.index(1,1)); + QTest::keyClick(&view, Qt::Key_Down); + QTest::qWait(10); + QCOMPARE(view.currentIndex(), model.index(2,1)); + +} + + QTEST_MAIN(tst_QListView) #include "tst_qlistview.moc" |