aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/debugger
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-23 15:52:10 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-26 09:05:16 +0200
commit12fd2ccd3fa2dc0133b5a3fb89f9fdf5cf721232 (patch)
tree880acb9c7c0d8289185b6aebe4339f439c707a0e /src/qml/debugger
parent2e4f66caa8a5f9e887dbdb4e3f2ae5c9be9a7005 (diff)
Fix Persistent/WeakValue API
Don't use unprotected Values in the API anymore. Change-Id: I8851628227fca374de24701bc8ee0908b5ae3923 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/debugger')
-rw-r--r--src/qml/debugger/qqmlenginedebugservice.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/debugger/qqmlenginedebugservice.cpp b/src/qml/debugger/qqmlenginedebugservice.cpp
index 2b013129ce..5f3db9fb65 100644
--- a/src/qml/debugger/qqmlenginedebugservice.cpp
+++ b/src/qml/debugger/qqmlenginedebugservice.cpp
@@ -742,8 +742,10 @@ bool QQmlEngineDebugService::setMethodBody(int objectId, const QString &method,
Q_ASSERT(vmeMetaObject); // the fact we found the property above should guarentee this
int lineNumber = vmeMetaObject->vmeMethodLineNumber(prop->coreIndex);
- vmeMetaObject->setVmeMethod(prop->coreIndex,
- QQmlExpressionPrivate::evalFunction(contextData, object, jsfunction, contextData->url.toString(), lineNumber));
+ QV4::ExecutionEngine *v4 = QV8Engine::getV4(qmlEngine(object)->handle());
+ QV4::Scope scope(v4);
+ QV4::ScopedValue v(scope, QQmlExpressionPrivate::evalFunction(contextData, object, jsfunction, contextData->url.toString(), lineNumber));
+ vmeMetaObject->setVmeMethod(prop->coreIndex, v);
return true;
}