aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlvmemetaobject.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-27 09:45:55 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-30 08:05:46 +0200
commit0e36db9f1179d1bdf0710494e98ff7aee1a2d836 (patch)
treee9f00fe028ee24b4412e3bb8418a3381e81c772b /src/qml/qml/qqmlvmemetaobject.cpp
parent472c8e6bed0b18c4e853c905ace07a09c64c29d2 (diff)
Remove most uses of Value from qml/qml
Change-Id: I409a8505a9e01f86d777bc694d24516d1c8f0c4d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r--src/qml/qml/qqmlvmemetaobject.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp
index e8960eb328..dfba6bb3b6 100644
--- a/src/qml/qml/qqmlvmemetaobject.cpp
+++ b/src/qml/qml/qqmlvmemetaobject.cpp
@@ -937,7 +937,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a)
callData->thisObject = ep->v8engine()->global();
for (int ii = 0; ii < data->parameterCount; ++ii)
- callData->args[ii] = QV4::Value::fromReturnedValue(ep->v8engine()->fromVariant(*(QVariant *)a[ii + 1]));
+ callData->args[ii] = ep->v8engine()->fromVariant(*(QVariant *)a[ii + 1]);
QV4::ScopedValue result(scope);
QV4::ExecutionContext *ctx = function->engine()->current;
@@ -1023,7 +1023,7 @@ QVariant QQmlVMEMetaObject::readPropertyAsVariant(int id)
}
}
-void QQmlVMEMetaObject::writeVarProperty(int id, const QV4::Value &value)
+void QQmlVMEMetaObject::writeVarProperty(int id, const QV4::ValueRef value)
{
Q_ASSERT(id >= firstVarPropertyIndex);
if (!ensureVarPropertiesAllocated())
@@ -1040,8 +1040,7 @@ void QQmlVMEMetaObject::writeVarProperty(int id, const QV4::Value &value)
QObject *valueObject = 0;
QQmlVMEVariantQObjectPtr *guard = getQObjectGuardForProperty(id);
- QV4::ScopedValue v(scope, value);
- QV4::ScopedObject o(scope, v);
+ QV4::ScopedObject o(scope, value);
if (o) {
// And, if the new value is a scarce resource, we need to ensure that it does not get
// automatically released by the engine until no other references to it exist.
@@ -1064,7 +1063,7 @@ void QQmlVMEMetaObject::writeVarProperty(int id, const QV4::Value &value)
}
// Write the value and emit change signal as appropriate.
- vp->putIndexed(id - firstVarPropertyIndex, v);
+ vp->putIndexed(id - firstVarPropertyIndex, value);
activate(object, methodOffset() + id, 0);
}
@@ -1202,7 +1201,7 @@ QV4::ReturnedValue QQmlVMEMetaObject::vmeProperty(int index)
return readVarProperty(index - propOffset());
}
-void QQmlVMEMetaObject::setVMEProperty(int index, const QV4::Value &v)
+void QQmlVMEMetaObject::setVMEProperty(int index, const QV4::ValueRef v)
{
if (index < propOffset()) {
Q_ASSERT(parentVMEMetaObject());