summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlvisual/ListView
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-11-03 06:38:20 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-11-03 06:38:20 (GMT)
commit3cc9c5f2541f192733436c79c4d14aa34177c3cc (patch)
tree40446a431b66278a332a42139c30d615e89d94ae /tests/auto/declarative/qmlvisual/ListView
parenta2ecba558d4722bfae9acea84e6e33e72187756d (diff)
downloadQt-3cc9c5f2541f192733436c79c4d14aa34177c3cc.zip
Qt-3cc9c5f2541f192733436c79c4d14aa34177c3cc.tar.gz
Qt-3cc9c5f2541f192733436c79c4d14aa34177c3cc.tar.bz2
highlightranges.qml example and visual test contained binding loop.
Also, the currentIndex stayed -1 since the views all bound to each others currentIndex, which starts as -1. Task-number: QTBUG-14794 Reviewed-by: Yann Bodson
Diffstat (limited to 'tests/auto/declarative/qmlvisual/ListView')
-rw-r--r--tests/auto/declarative/qmlvisual/ListView/listview.qml12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/auto/declarative/qmlvisual/ListView/listview.qml b/tests/auto/declarative/qmlvisual/ListView/listview.qml
index 43c86a0..6171c75 100644
--- a/tests/auto/declarative/qmlvisual/ListView/listview.qml
+++ b/tests/auto/declarative/qmlvisual/ListView/listview.qml
@@ -1,7 +1,8 @@
import QtQuick 1.0
Rectangle {
- property string skip: "Incorrect start: QTBUG-14794"
+ id: root
+ property int current: 0
width: 600; height: 300; color: "white"
ListModel {
@@ -57,7 +58,9 @@ Rectangle {
id: list1
width: 200; height: parent.height
model: myModel; delegate: myDelegate
- highlight: myHighlight; currentIndex: list3.currentIndex
+ highlight: myHighlight
+ currentIndex: root.current
+ onCurrentIndexChanged: root.current = currentIndex
focus: true
}
ListView {
@@ -67,13 +70,14 @@ Rectangle {
preferredHighlightBegin: 80
preferredHighlightEnd: 220
highlightRangeMode: "ApplyRange"
- currentIndex: list1.currentIndex
+ currentIndex: root.current
}
ListView {
id: list3
x: 400; width: 200; height: parent.height
model: myModel; delegate: myDelegate; highlight: myHighlight
- currentIndex: list1.currentIndex
+ currentIndex: root.current
+ onCurrentIndexChanged: root.current = currentIndex
preferredHighlightBegin: 125
preferredHighlightEnd: 125
highlightRangeMode: "StrictlyEnforceRange"