diff options
author | Andrew den Exter <andrew.den-exter@nokia.com> | 2011-09-26 16:42:17 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-09-26 09:37:32 +0200 |
commit | 162b52e7e95e3fcd747fb4b1867bcc54e603c266 (patch) | |
tree | 292c29f0171ff05148f83feaa8fb6139f413b41e /src | |
parent | 26489b1ea36d809105191a1b987dce8c3d3aa5f9 (diff) |
Don't give move ids to moved inserts.
Move ids identify a paired remove and insert, an insert that has a
move id but no corresponding remove breaks anything relying on that
identity.
Change-Id: I9512e298bc518c5abf5bca7523a375baf8a39407
Reviewed-on: http://codereview.qt-project.org/5512
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Andrew den Exter <andrew.den-exter@nokia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/declarative/util/qdeclarativechangeset.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativechangeset.cpp b/src/declarative/util/qdeclarativechangeset.cpp index d941d5e842..9e875938da 100644 --- a/src/declarative/util/qdeclarativechangeset.cpp +++ b/src/declarative/util/qdeclarativechangeset.cpp @@ -219,7 +219,8 @@ void QDeclarativeChangeSet::applyRemovals(QVector<Remove> &removals, QVector<Ins } if (rit->moveId != -1 && difference > 0) { - iit = insertions.insert(iit, Insert(iit->index, difference, moveId)); + iit = insertions.insert(iit, Insert( + iit->index, difference, insert->moveId != -1 ? moveId : -1)); ++iit; iit->index += difference; iit->count -= difference; |