aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/localstorage/plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/localstorage/plugin.cpp')
-rw-r--r--src/imports/localstorage/plugin.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp
index 92df9c3755..323b89b3e5 100644
--- a/src/imports/localstorage/plugin.cpp
+++ b/src/imports/localstorage/plugin.cpp
@@ -268,17 +268,17 @@ static Value qmlsqldatabase_executeSql(SimpleCallContext *ctx)
} else if (Object *object = values.asObject()) {
ObjectIterator it(object, ObjectIterator::WithProtoChain|ObjectIterator::EnumerableOnly);
while (1) {
- String *name;
- uint index;
- PropertyAttributes attrs;
- Property *p = it.next(&name, &index, &attrs);
- if (!p)
+ Value value;
+ Value key = it.nextPropertyName(&value);
+ if (key.isNull())
break;
- QVariant v = engine->toVariant(object->getValue(ctx, p, attrs), -1);
- if (name)
- query.bindValue(name->toQString(), v);
- else
- query.bindValue(index, v);
+ QVariant v = engine->toVariant(value, -1);
+ if (key.isString()) {
+ query.bindValue(key.stringValue()->toQString(), v);
+ } else {
+ assert(key.isInteger());
+ query.bindValue(key.integerValue(), v);
+ }
}
} else {
query.bindValue(0, engine->toVariant(values, -1));