summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-17 03:54:56 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-17 03:54:56 (GMT)
commitf1efdb342224cfb1e22b55ae4c704635edbbf46a (patch)
tree2dbda423b31610cca65ee7a85fbd10543c023fd3
parentc56a485e9bc5758d154ae87a3fb69b445244cede (diff)
downloadQt-f1efdb342224cfb1e22b55ae4c704635edbbf46a.zip
Qt-f1efdb342224cfb1e22b55ae4c704635edbbf46a.tar.gz
Qt-f1efdb342224cfb1e22b55ae4c704635edbbf46a.tar.bz2
Fix binding (it should be resulted to arrays, since SQL and JS are not)
-rw-r--r--src/declarative/qml/qmlsqldatabase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/declarative/qml/qmlsqldatabase.cpp b/src/declarative/qml/qmlsqldatabase.cpp
index 330d904..6e32fb7 100644
--- a/src/declarative/qml/qmlsqldatabase.cpp
+++ b/src/declarative/qml/qmlsqldatabase.cpp
@@ -248,10 +248,10 @@ static QScriptValue qmlsqldatabase_executeSql(QScriptContext *context, QScriptEn
QSqlQuery query(db);
bool err = false;
if (query.prepare(sql)) {
- if (values.isArray()) {
+ if (values.isObject()) {
for (QScriptValueIterator it(values); it.hasNext();) {
it.next();
- query.addBindValue(it.value().toVariant());
+ query.bindValue(it.name(),it.value().toVariant());
}
} else {
query.bindValue(0,values.toVariant());