From 082cc5aba6ea7eed13fc521b26f005c71970aa27 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Wed, 1 Feb 2012 16:04:31 +1000 Subject: Fix ListView and GridView test failures. The QAbstractItemModel moved signals expect the destination index to be relative to the list prior to the moved items being removed. Change-Id: If992b7f305677dac284e152fd44e55c258c85dc3 Reviewed-by: Matthew Vogt --- .../auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp') diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index 2e3b8b25..574bff14 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -167,7 +167,7 @@ public: } void moveItem(int from, int to) { - emit beginMoveRows(QModelIndex(), from, from, QModelIndex(), to); + emit beginMoveRows(QModelIndex(), from, from, QModelIndex(), to > from ? to + 1 : to); list.move(from, to); emit endMoveRows(); } -- cgit v1.2.3