aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-09-26 16:42:17 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-26 09:37:32 +0200
commit162b52e7e95e3fcd747fb4b1867bcc54e603c266 (patch)
tree292c29f0171ff05148f83feaa8fb6139f413b41e /tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp
parent26489b1ea36d809105191a1b987dce8c3d3aa5f9 (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 'tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp b/tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp
index 4aaefba7c4..6b3fcf90bf 100644
--- a/tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp
+++ b/tests/auto/declarative/qdeclarativechangeset/tst_qdeclarativechangeset.cpp
@@ -132,8 +132,13 @@ private slots:
void sequence();
};
-bool operator ==(const tst_qdeclarativemodelchange::Signal &left, const tst_qdeclarativemodelchange::Signal &right) {
- return left.index == right.index && left.count == right.count && left.to == right.to; }
+bool operator ==(const tst_qdeclarativemodelchange::Signal &left, const tst_qdeclarativemodelchange::Signal &right)
+{
+ return left.index == right.index
+ && left.count == right.count
+ && left.to == right.to
+ && ((left.moveId == -1 && right.moveId == -1) || left.moveId != -1 && right.moveId != -1);
+}
QDebug operator <<(QDebug debug, const tst_qdeclarativemodelchange::Signal &signal)