aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4jsonobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4jsonobject.cpp')
-rw-r--r--src/qml/jsruntime/qv4jsonobject.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index f40c765327..facc2da781 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -1057,10 +1057,8 @@ QV4::ReturnedValue JsonObject::fromJsonArray(ExecutionEngine *engine, const QJso
Scoped<ArrayObject> a(scope, engine->newArrayObject());
a->arrayReserve(size);
ScopedValue v(scope);
- for (int i = 0; i < size; i++) {
+ for (int i = 0; i < size; i++)
a->arrayData->put(i, (v = fromJsonValue(engine, array.at(i))));
- a->arrayData->setLength(i + 1);
- }
a->setArrayLengthUnchecked(size);
return a.asReturnedValue();
}