summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-10-20 03:16:50 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-10-20 03:16:50 (GMT)
commit965e47f1758079aaf53bfd7a4e0577a249114cb9 (patch)
tree106d11d3ac3865c9b42ff47180e43369c7263dd7 /tests/auto
parente3af86a892cd7ce70297f0b1e76390cfd18536e2 (diff)
downloadQt-965e47f1758079aaf53bfd7a4e0577a249114cb9.zip
Qt-965e47f1758079aaf53bfd7a4e0577a249114cb9.tar.gz
Qt-965e47f1758079aaf53bfd7a4e0577a249114cb9.tar.bz2
ListView item insertion didn't handle delayed item removal correctly.
The delayed removal items weren't handled correctly by mapRangeFromModel() function. Use mapFromModel() instead which gives us what we actually want and remove unused mapRangeFromModel(). Task-number: QTBUG-14471 Reviewed-by: Michael Brasser
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index 080631c..79fef7a 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -673,6 +673,15 @@ void tst_QDeclarativeListView::removed(bool animated)
QTRY_COMPARE(item->y(),80+i*20.0);
}
+ model.removeItems(1, 17);
+// QTest::qWait(300);
+
+ model.removeItems(2, 1);
+ model.addItem("New", "1");
+
+ QTRY_VERIFY(name = findItem<QDeclarativeText>(contentItem, "textName", model.count()-1));
+ QCOMPARE(name->text(), QString("New"));
+
delete canvas;
}