diff options
author | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-12-01 09:55:03 (GMT) |
---|---|---|
committer | Gabriel de Dietrich <gabriel.dietrich-de@nokia.com> | 2009-12-01 09:56:09 (GMT) |
commit | f63fdc09fcaf5258694e9c2f21a5cd22c6677a17 (patch) | |
tree | 5ad226776cbf5fdf2b29c88591be1779c613bb3c /tests | |
parent | 4bb7bacccff707a693de6d50c7ce886126b68c25 (diff) | |
download | Qt-f63fdc09fcaf5258694e9c2f21a5cd22c6677a17.zip Qt-f63fdc09fcaf5258694e9c2f21a5cd22c6677a17.tar.gz Qt-f63fdc09fcaf5258694e9c2f21a5cd22c6677a17.tar.bz2 |
Extended tst_QListView::indexAt to test viewport bounds.
Reviewed-by: Olivier
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qlistview/tst_qlistview.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qlistview/tst_qlistview.cpp b/tests/auto/qlistview/tst_qlistview.cpp index 602da61..24a553f 100644 --- a/tests/auto/qlistview/tst_qlistview.cpp +++ b/tests/auto/qlistview/tst_qlistview.cpp @@ -586,7 +586,15 @@ void tst_QListView::indexAt() index = view.indexAt(QPoint(20,2 * sz.height())); QVERIFY(!index.isValid()); - + // Check when peeking out of the viewport bounds + index = view.indexAt(QPoint(view.viewport()->rect().width(), 0)); + QVERIFY(!index.isValid()); + index = view.indexAt(QPoint(-1, 0)); + QVERIFY(!index.isValid()); + index = view.indexAt(QPoint(20, view.viewport()->rect().height())); + QVERIFY(!index.isValid()); + index = view.indexAt(QPoint(20, -1)); + QVERIFY(!index.isValid()); model.rCount = 30; QListViewShowEventListener view2; |