summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-09-24 08:16:42 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-09-24 08:16:42 (GMT)
commit686583c37af269137898ab01af4c2b585f91baea (patch)
tree3ee038a221591942b6317cee402a7975b21a49ff /examples
parent64279c11f2092a5e6e03f1b7e4bfc7a9065807f8 (diff)
downloadQt-686583c37af269137898ab01af4c2b585f91baea.zip
Qt-686583c37af269137898ab01af4c2b585f91baea.tar.gz
Qt-686583c37af269137898ab01af4c2b585f91baea.tar.bz2
Only same-as-webkit iteration example (QML actually supports more)
Diffstat (limited to 'examples')
-rw-r--r--examples/declarative/sql/hello.qml9
1 files changed, 1 insertions, 8 deletions
diff --git a/examples/declarative/sql/hello.qml b/examples/declarative/sql/hello.qml
index e43d320..db568a9 100644
--- a/examples/declarative/sql/hello.qml
+++ b/examples/declarative/sql/hello.qml
@@ -12,15 +12,8 @@ Text {
tx.executeSql('INSERT INTO Greeting VALUES(?, ?)', [ 'hello', 'world' ]);
tx.executeSql('SELECT * FROM Greeting', [],
function(tx, rs) {
- /* Inefficient HTML5-compatible way
for(var i = 0; i < rs.rows.length; i++) {
- r += rs.rows[i][0] + ", " + rs.rows[i][1] + "\n"
- }
- */
- /* Efficient way: forward only, not "length" query */
- rs.rows.forwardOnly = true;
- for(var i = 0; rs.rows[i]; i++) {
- r += rs.rows[i][0] + ", " + rs.rows[i][1] + "\n"
+ r += rs.rows.item(i).salutation + ", " + rs.rows.item(i).salutee + "\n"
}
},
function(tx, error) {