aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-08-25 17:29:33 +0200
committerLars Knoll <lars.knoll@theqtcompany.com>2015-09-15 19:12:59 +0000
commit9ea6c69ab5e18cc4bb703f6d3572e7ddc87e34a5 (patch)
tree7b46a541ccfa6a4a5746ee42c0f5a00c83624ebe /src/qml/jsruntime/qv4object.cpp
parentc5f3028d43662050a6bf5419690ddd4ab4288db8 (diff)
Simplify Object::putValue()
Change-Id: I1cc43f0081f63aed27c82875192e0f415ec995d5 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp7
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;
}
}