summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlistview/tst_qlistview.cpp
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-12-02 13:22:14 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-12-02 13:22:29 (GMT)
commit25023911295c201758faaa2c800b2388ddf1e0b0 (patch)
tree74cbd3766b1207a00d1bd48dd3a5798307a540c9 /tests/auto/qlistview/tst_qlistview.cpp
parentd16ba0a93d611689bce9a2732a1cc8c9a317f5bf (diff)
parentfb01592ef98dbaa4d0591df77cffaaf0ea0e117a (diff)
downloadQt-25023911295c201758faaa2c800b2388ddf1e0b0.zip
Qt-25023911295c201758faaa2c800b2388ddf1e0b0.tar.gz
Qt-25023911295c201758faaa2c800b2388ddf1e0b0.tar.bz2
Merge commit 'oslo-staging-2/4.6' into upstream/4.6
Diffstat (limited to 'tests/auto/qlistview/tst_qlistview.cpp')
-rw-r--r--tests/auto/qlistview/tst_qlistview.cpp10
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;