summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-23 09:15:03 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-23 09:15:03 (GMT)
commitbf2f68704ca62fa5ac21c0559dc896f02cf4775d (patch)
tree88de2490139de7d011b565d90432570a61435050 /tests
parent33f0f832a243ee2cb188fcf27126bde6c6c883b0 (diff)
parentd9d68c383b7b1438d3034cd3708cfba5fb9706ef (diff)
downloadQt-bf2f68704ca62fa5ac21c0559dc896f02cf4775d.zip
Qt-bf2f68704ca62fa5ac21c0559dc896f02cf4775d.tar.gz
Qt-bf2f68704ca62fa5ac21c0559dc896f02cf4775d.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: DelayRemove of list delegate on section boundary duplicated section
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml5
-rw-r--r--tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp13
2 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml b/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml
index 35a398b..9d9cda8 100644
--- a/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml
+++ b/tests/auto/declarative/qdeclarativelistview/data/listview-sections_delegate.qml
@@ -41,6 +41,11 @@ Rectangle {
text: wrapper.y
}
}
+ ListView.onRemove: SequentialAnimation {
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true }
+ NumberAnimation { target: wrapper; property: "height"; to: 0; duration: 100; easing.type: Easing.InOutQuad }
+ PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: false }
+ }
}
}
]
diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
index f358625..c7f90da 100644
--- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
+++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp
@@ -1078,6 +1078,19 @@ void tst_QDeclarativeListView::sectionsDelegate()
QTRY_COMPARE(item->y(), qreal(i*20*6));
}
+ // remove section boundary
+ model.removeItem(5);
+ qApp->processEvents();
+ for (int i = 0; i < 3; ++i) {
+ QDeclarativeItem *item = findItem<QDeclarativeItem>(contentItem,
+ "sect_" + (i == 0 ? QString("aaa") : QString::number(i)));
+ QVERIFY(item);
+ }
+
+ // QTBUG-17606
+ QList<QDeclarativeItem*> items = findItems<QDeclarativeItem>(contentItem, "sect_1");
+ QCOMPARE(items.count(), 1);
+
delete canvas;
}