summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativepathview
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2011-04-27 09:27:52 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2011-04-27 09:27:52 (GMT)
commit896db169ea224deb96c59ce8af800d019de63f12 (patch)
tree8350c36941ccfd74df35fb8a6a761edcbf042452 /tests/auto/declarative/qdeclarativepathview
parent7a73de74fc517ff5722289cce4e4e754ff2417be (diff)
parentf8fea6f3b8fd3a1baa256130b23efc9e67a40e21 (diff)
downloadQt-896db169ea224deb96c59ce8af800d019de63f12.zip
Qt-896db169ea224deb96c59ce8af800d019de63f12.tar.gz
Qt-896db169ea224deb96c59ce8af800d019de63f12.tar.bz2
Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7
Conflicts: src/opengl/qwindowsurface_gl.cpp src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'tests/auto/declarative/qdeclarativepathview')
-rw-r--r--tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
index 8000137..46c3519 100644
--- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
+++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp
@@ -458,6 +458,16 @@ void tst_QDeclarativePathView::dataModel()
model.removeItem(model.count()-1);
QCOMPARE(pathview->currentIndex(), model.count()-1);
+ // QTBUG-18825
+ // Confirm that the target offset is adjusted when removing items
+ pathview->setCurrentIndex(model.count()-1);
+ QTRY_COMPARE(pathview->offset(), 1.);
+ pathview->setCurrentIndex(model.count()-5);
+ model.removeItem(model.count()-1);
+ model.removeItem(model.count()-1);
+ model.removeItem(model.count()-1);
+ QTRY_COMPARE(pathview->offset(), 2.);
+
delete canvas;
}