summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-08-27 13:34:02 +1000
committerMichael Brasser <michael.brasser@nokia.com>2010-08-27 13:34:02 +1000
commit19d2736f143dd9272c4d68c633a574ea059ed19c (patch)
tree77805754dfbf4b894b26af4a367ac9cc6d931594
parent2960b5d0d1ea21c3a716962329e02a1a44198505 (diff)
Handle difference in QList/QAbstractItemModel move semantics.
-rw-r--r--qobjectlistmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qobjectlistmodel.cpp b/qobjectlistmodel.cpp
index d438ef0..92b4646 100644
--- a/qobjectlistmodel.cpp
+++ b/qobjectlistmodel.cpp
@@ -228,7 +228,7 @@ void QObjectListModel::replace(int i, QObject *object)
void QObjectListModel::move(int from, int to)
{
- beginMoveRows(QModelIndex(), from, from, QModelIndex(), to);
+ beginMoveRows(QModelIndex(), from, from, QModelIndex(), to > from ? to+1 : to);
m_objects.move(from, to);
endMoveRows();
}