summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-02-01 16:04:31 +1000
committerAndrew den Exter <andrew.den-exter@nokia.com>2012-02-01 07:53:47 +0100
commit082cc5aba6ea7eed13fc521b26f005c71970aa27 (patch)
treef563d9e4658d996569950b4cd0005fbb74742df5 /tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp
parent507c01fe7ff6fdd51bc2bcf73ea87ce6b02ca321 (diff)
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 <matthew.vogt@nokia.com>
Diffstat (limited to 'tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp2
1 files changed, 1 insertions, 1 deletions
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();
}