diff options
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index 2cdc8bd1ee..d121b547ef 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -100,11 +100,14 @@ ReturnedValue Object::getValue(const Value &thisObject, const Property *p, Prope return getter->call(callData); } -void Object::putValue(Property *pd, PropertyAttributes attrs, const Value &value) +void Object::putValue(uint memberIndex, const Value &value) { if (internalClass()->engine->hasException) return; + Property *pd = propertyAt(memberIndex); + PropertyAttributes attrs = internalClass()->propertyData[memberIndex]; + if (attrs.isAccessor()) { if (Heap::FunctionObject *set = pd->setter()) { Scope scope(set->internalClass->engine); @@ -483,7 +486,7 @@ void Object::setLookup(Managed *m, Lookup *l, const Value &value) } if (idx != UINT_MAX) { - o->putValue(o->propertyAt(idx), o->internalClass()->propertyData[idx], value); + o->putValue(idx, value); return; } } |