aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/localstorage/localstorage/Header.qml16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/quick/localstorage/localstorage/Header.qml b/examples/quick/localstorage/localstorage/Header.qml
index e0e465ebc9..a08645a170 100644
--- a/examples/quick/localstorage/localstorage/Header.qml
+++ b/examples/quick/localstorage/localstorage/Header.qml
@@ -52,22 +52,22 @@ Item {
}
function initrec_new() {
- dateInput.text = ""
- descInput.text = ""
- distInput.text = ""
+ dateInput.clear()
+ descInput.clear()
+ distInput.clear()
listView.model.insert(0, {
date: "",
trip_desc: "",
- distance: ""
+ distance: 0
})
listView.currentIndex = 0
dateInput.forceActiveFocus()
}
function initrec() {
- dateInput.text = ""
- descInput.text = ""
- distInput.text = ""
+ dateInput.clear()
+ descInput.clear()
+ distInput.clear()
}
function setlistview() {
@@ -76,7 +76,7 @@ Item {
listView.model.setProperty(listView.currentIndex, "trip_desc",
descInput.text)
listView.model.setProperty(listView.currentIndex, "distance",
- distInput.text)
+ parseInt(distInput.text,10))
}
Rectangle {