summaryrefslogtreecommitdiffstats
path: root/src/declarative/util/qmllistmodel.cpp
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2009-09-10 22:32:18 (GMT)
committerMartin Jones <martin.jones@nokia.com>2009-09-10 22:32:18 (GMT)
commitad96554aa5eae45d256120dbaf840da0bcee2fba (patch)
tree8c0389713eb7d9fb7ac31d9e700f2edb85c3979e /src/declarative/util/qmllistmodel.cpp
parent033f7de03ed83cfa68436660e6354cb94452ee25 (diff)
downloadQt-ad96554aa5eae45d256120dbaf840da0bcee2fba.zip
Qt-ad96554aa5eae45d256120dbaf840da0bcee2fba.tar.gz
Qt-ad96554aa5eae45d256120dbaf840da0bcee2fba.tar.bz2
Implement itemsMoved() in ListView.
No animation possible currently.
Diffstat (limited to 'src/declarative/util/qmllistmodel.cpp')
-rw-r--r--src/declarative/util/qmllistmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/declarative/util/qmllistmodel.cpp b/src/declarative/util/qmllistmodel.cpp
index 19499a1..345bc3b 100644
--- a/src/declarative/util/qmllistmodel.cpp
+++ b/src/declarative/util/qmllistmodel.cpp
@@ -497,7 +497,7 @@ void QmlListModel::insert(int index, const QScriptValue& valuemap)
*/
void QmlListModel::move(int from, int to, int n)
{
- if (from+n > count() || to+n > count() || n==0 || from==to)
+ if (from+n > count() || to+n > count() || n==0 || from==to || from < 0 || to < 0)
return;
if (from > to) {
// Only move forwards - flip if backwards moving