aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquicklistview/data/emptymodel.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquicklistview/data/emptymodel.qml')
-rw-r--r--tests/auto/quick/qquicklistview/data/emptymodel.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/quick/qquicklistview/data/emptymodel.qml b/tests/auto/quick/qquicklistview/data/emptymodel.qml
index 16bcd3f9ae..3feec691cf 100644
--- a/tests/auto/quick/qquicklistview/data/emptymodel.qml
+++ b/tests/auto/quick/qquicklistview/data/emptymodel.qml
@@ -1,4 +1,4 @@
-import QtQuick 2.0
+import QtQuick 2.1
Rectangle {
ListModel {
id: model
@@ -12,11 +12,13 @@ Rectangle {
}
function remove() {
model.remove(0)
+ list.forceLayout()
isCurrentItemNull = list.currentItem === null //check no seg fault
}
function add() {
model.append({name: "hello"})
+ list.forceLayout()
isCurrentItemNull = list.currentItem === null
}
property bool isCurrentItemNull