aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4object.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-19 09:10:42 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commit332b870bd8f0fba6f09e539376a674d7a4413631 (patch)
treea3977c20b6331e1e6ab1d85e5e25836155797d0c /src/qml/jsruntime/qv4object.cpp
parentdf5edd28bc4258b89d9d5ffdddf837f339a17aad (diff)
Convert putIndexed()
Change-Id: I7d02b0fdf45079d0f7afcfb6d3158dd60cb09f33 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r--src/qml/jsruntime/qv4object.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp
index 44c248dd1a..2a36371bdd 100644
--- a/src/qml/jsruntime/qv4object.cpp
+++ b/src/qml/jsruntime/qv4object.cpp
@@ -472,7 +472,7 @@ void Object::put(Managed *m, const StringRef name, const ValueRef value)
static_cast<Object *>(m)->internalPut(name, value);
}
-void Object::putIndexed(Managed *m, uint index, const Value &value)
+void Object::putIndexed(Managed *m, uint index, const ValueRef value)
{
static_cast<Object *>(m)->internalPutIndexed(index, value);
}
@@ -723,7 +723,7 @@ void Object::internalPut(const StringRef name, const ValueRef value)
{
uint idx = name->asArrayIndex();
if (idx != UINT_MAX)
- return putIndexed(idx, *value);
+ return putIndexed(idx, value);
name->makeIdentifier();
@@ -801,7 +801,7 @@ void Object::internalPut(const StringRef name, const ValueRef value)
}
}
-void Object::internalPutIndexed(uint index, const Value &value)
+void Object::internalPutIndexed(uint index, const ValueRef value)
{
Property *pd = 0;
PropertyAttributes attrs;
@@ -832,7 +832,7 @@ void Object::internalPutIndexed(uint index, const Value &value)
} else if (!attrs.isWritable())
goto reject;
else
- pd->value = value;
+ pd->value = *value;
return;
} else if (!prototype()) {
if (!extensible)
@@ -859,13 +859,13 @@ void Object::internalPutIndexed(uint index, const Value &value)
Scope scope(engine());
ScopedCallData callData(scope, 1);
- callData->args[0] = value;
+ callData->args[0] = *value;
callData->thisObject = Value::fromObject(this);
pd->setter()->call(callData);
return;
}
- arraySet(index, value);
+ arraySet(index, *value);
return;
reject: