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.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/qml/jsruntime/qv4jsonobject.cpp b/src/qml/jsruntime/qv4jsonobject.cpp
index 3649163626..10d30756a1 100644
--- a/src/qml/jsruntime/qv4jsonobject.cpp
+++ b/src/qml/jsruntime/qv4jsonobject.cpp
@@ -791,16 +791,14 @@ QString Stringify::JO(ObjectRef o)
QStringList partial;
if (propertyList.isEmpty()) {
- ObjectIterator it(o.getPointer(), ObjectIterator::EnumerableOnly);
+ ObjectIterator it(scope, o, ObjectIterator::EnumerableOnly);
ScopedValue name(scope);
ScopedValue val(scope);
while (1) {
- Value v;
- name = it.nextPropertyNameAsString(&v);
+ name = it.nextPropertyNameAsString(val);
if (name->isNull())
break;
- val = v;
QString key = name->toQStringNoThrow();
QString member = makeMember(key, val);
if (!member.isEmpty())
@@ -1024,16 +1022,14 @@ QJsonObject JsonObject::toJsonObject(ObjectRef o, V4ObjectSet &visitedObjects)
visitedObjects.insert(o);
- ObjectIterator it(o, ObjectIterator::EnumerableOnly);
+ ObjectIterator it(scope, o, ObjectIterator::EnumerableOnly);
ScopedValue name(scope);
+ QV4::ScopedValue val(scope);
while (1) {
- Value v;
- name = it.nextPropertyNameAsString(&v);
+ name = it.nextPropertyNameAsString(val);
if (name->isNull())
break;
- QV4::ScopedValue val(scope, v);
-
QString key = name->toQStringNoThrow();
if (!val->asFunctionObject())
result.insert(key, toJsonValue(val, visitedObjects));