diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-27 17:04:42 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-30 08:05:51 +0200 |
commit | c0ec918787068fcf269925b13a34115ff77c3126 (patch) | |
tree | 9e1a511baf5f7e1ff53a102294b28a839d2f10f5 /src/imports | |
parent | e57c2c8a0adef8949f69195573d149237814bed1 (diff) |
Remove some uses of raw Object pointers
Change-Id: I7c715f33d197ebbf6f0c00040099b27ed7221d42
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/imports')
-rw-r--r-- | src/imports/localstorage/plugin.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/imports/localstorage/plugin.cpp b/src/imports/localstorage/plugin.cpp index 0060613e93..267b2b6395 100644 --- a/src/imports/localstorage/plugin.cpp +++ b/src/imports/localstorage/plugin.cpp @@ -268,13 +268,15 @@ static ReturnedValue qmlsqldatabase_executeSql(SimpleCallContext *ctx) if (query.prepare(sql)) { if (ctx->callData->argc > 1) { ScopedValue values(scope, ctx->callData->args[1]); - if (ArrayObject *array = values->asArrayObject()) { + if (values->asArrayObject()) { + ScopedArrayObject array(scope, values); quint32 size = array->arrayLength(); QV4::ScopedValue v(scope); for (quint32 ii = 0; ii < size; ++ii) query.bindValue(ii, engine->toVariant((v = array->getIndexed(ii)), -1)); - } else if (Object *object = values->asObject()) { - ObjectIterator it(object, ObjectIterator::WithProtoChain|ObjectIterator::EnumerableOnly); + } else if (values->asObject()) { + ScopedObject object(scope, values); + ObjectIterator it(object.getPointer(), ObjectIterator::WithProtoChain|ObjectIterator::EnumerableOnly); ScopedValue key(scope); while (1) { Value value; |