summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-19 07:18:42 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-19 07:18:42 (GMT)
commitb988ef5a3d9ac96cfa7b9fd4b87522bbab84ffce (patch)
treedb065658178c6a2387f8e289ff303b2bf87aa421 /examples
parentb442982fed0f1c40eb936babbba197ce09e28c37 (diff)
downloadQt-b988ef5a3d9ac96cfa7b9fd4b87522bbab84ffce.zip
Qt-b988ef5a3d9ac96cfa7b9fd4b87522bbab84ffce.tar.gz
Qt-b988ef5a3d9ac96cfa7b9fd4b87522bbab84ffce.tar.bz2
More strict type checking of ListElement properties.
Task-number: QTBUG-6203
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/listview/content/ClickAutoRepeating.qml1
-rw-r--r--examples/declarative/listview/dynamic.qml5
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/declarative/listview/content/ClickAutoRepeating.qml b/examples/declarative/listview/content/ClickAutoRepeating.qml
index 796f9e3..be37b50 100644
--- a/examples/declarative/listview/content/ClickAutoRepeating.qml
+++ b/examples/declarative/listview/content/ClickAutoRepeating.qml
@@ -11,6 +11,7 @@ Item {
signal clicked
isPressed: SequentialAnimation {
+ running: false
id: autoRepeat
PropertyAction { target: page; property: "isPressed"; value: true }
ScriptAction { script: page.pressed() }
diff --git a/examples/declarative/listview/dynamic.qml b/examples/declarative/listview/dynamic.qml
index 2607527..dd898f9 100644
--- a/examples/declarative/listview/dynamic.qml
+++ b/examples/declarative/listview/dynamic.qml
@@ -24,7 +24,6 @@ Rectangle {
}
ListElement {
name: "Cumquat"; cost: 3.25
- types: [ "Small", "Smaller" ]
attributes: [
ListElement { description: "Citrus" }
]
@@ -82,12 +81,12 @@ Rectangle {
anchors.right: removeButton.left; anchors.rightMargin: 35; spacing: 10
width: childrenRect.width; anchors.verticalCenter: parent.verticalCenter
Image { source: "content/pics/list-add.png"
- ClickAutoRepeating { id: clickUp; anchors.fill: parent; onClicked: fruitModel.set(index,"cost",Number(cost)+0.25) }
+ ClickAutoRepeating { id: clickUp; anchors.fill: parent; onClicked: fruitModel.setProperty(index,"cost",cost+0.25) }
scale: clickUp.isPressed ? 0.9 : 1; transformOrigin: Item.Center
}
Text { id: costText; text: '$'+Number(cost).toFixed(2); font.pixelSize: 15; color: "White"; font.bold: true; }
Image { source: "content/pics/list-remove.png"
- ClickAutoRepeating { id: clickDown; anchors.fill: parent; onClicked: fruitModel.set(index,"cost",Math.max(0,Number(cost)-0.25)) }
+ ClickAutoRepeating { id: clickDown; anchors.fill: parent; onClicked: fruitModel.setProperty(index,"cost",Math.max(0,cost-0.25)) }
scale: clickDown.isPressed ? 0.9 : 1; transformOrigin: Item.Center
}
}