diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-02 14:37:26 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-09 10:27:55 +0100 |
commit | 7041eb353a4ad416f51245cc17342e16b3a02a9b (patch) | |
tree | 5870620166ae82d23f0e22ce64c8b9ed4788f39f /src/qml/qml/qqmlvmemetaobject.cpp | |
parent | 8a779f65ae3fb830415b9f39d803be57b7f56d50 (diff) |
Move the variant conversion methods from qv8engine to qv4::ExecutionEngine
Change-Id: Ibd529ae5cc3ba06f46152e9daa9119a4e7a2561c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlvmemetaobject.cpp')
-rw-r--r-- | src/qml/qml/qqmlvmemetaobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp index 1f21b21aad..59fae5fcbd 100644 --- a/src/qml/qml/qqmlvmemetaobject.cpp +++ b/src/qml/qml/qqmlvmemetaobject.cpp @@ -945,7 +945,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] = QV8Engine::fromVariant(scope.engine, *(QVariant *)a[ii + 1]); + callData->args[ii] = QV4::ExecutionEngine::fromVariant(scope.engine, *(QVariant *)a[ii + 1]); QV4::ScopedValue result(scope); result = function->call(callData); @@ -955,7 +955,7 @@ int QQmlVMEMetaObject::metaCall(QMetaObject::Call c, int _id, void **a) ep->warning(error); if (a[0]) *(QVariant *)a[0] = QVariant(); } else { - if (a[0]) *(QVariant *)a[0] = QV8Engine::toVariant(scope.engine, result, 0); + if (a[0]) *(QVariant *)a[0] = QV4::ExecutionEngine::toVariant(scope.engine, result, 0); } ep->dereferenceScarceResources(); // "release" scarce resources if top-level expression evaluation is complete. @@ -1004,7 +1004,7 @@ QVariant QQmlVMEMetaObject::readPropertyAsVariant(int id) QV4::Scope scope(v4); QV4::ScopedObject o(scope, varProperties.value()); QV4::ScopedValue val(scope, o->getIndexed(id - firstVarPropertyIndex)); - return QV8Engine::toVariant(scope.engine, val, -1); + return QV4::ExecutionEngine::toVariant(scope.engine, val, -1); } return QVariant(); } else { @@ -1077,7 +1077,7 @@ void QQmlVMEMetaObject::writeProperty(int id, const QVariant &value) // 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. - QV4::ScopedValue newv(scope, QV8Engine::fromVariant(scope.engine, value)); + QV4::ScopedValue newv(scope, QV4::ExecutionEngine::fromVariant(scope.engine, value)); QV4::Scoped<QV4::VariantObject> v(scope, newv); if (!!v) v->addVmePropertyReference(); |