diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-11-28 15:33:48 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-04 08:31:49 +0000 |
commit | 8a6383775a301c8dd8c917a936655c534932a726 (patch) | |
tree | 9b68062c7e58cd6a3026b1ad33403aa09d1bdc7b /src/qml/qml/qqmljavascriptexpression.cpp | |
parent | aabeeda52c3b4d2e3327bfd00642d2d7c980719b (diff) |
Start cleaning up the QmlContextWrapper
The class should get merged with the QV4::QmlContext class.
Simplify the cleanup by moving both classes into a common
file.
Change-Id: I0074da79701d5f41eb51681b70fcde85bfd45fc1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression.cpp')
-rw-r--r-- | src/qml/qml/qqmljavascriptexpression.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression.cpp b/src/qml/qml/qqmljavascriptexpression.cpp index 8020bdb2be..54d9222a8e 100644 --- a/src/qml/qml/qqmljavascriptexpression.cpp +++ b/src/qml/qml/qqmljavascriptexpression.cpp @@ -374,7 +374,7 @@ QQmlJavaScriptExpression::evalFunction(QQmlContextData *ctxt, QObject *scopeObje QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine()); QV4::Scope scope(v4); - QV4::Scoped<QV4::QmlContext> qmlContext(scope, v4->rootContext()->newQmlContext(ctxt, scopeObject)); + QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(v4->rootContext(), ctxt, scopeObject)); QV4::Script script(v4, qmlContext, code, filename, line); QV4::ScopedValue result(scope); script.parse(); @@ -404,7 +404,7 @@ void QQmlJavaScriptExpression::createQmlBinding(QQmlContextData *ctxt, QObject * QV4::ExecutionEngine *v4 = QV8Engine::getV4(ep->v8engine()); QV4::Scope scope(v4); - QV4::Scoped<QV4::QmlContext> qmlContext(scope, v4->rootContext()->newQmlContext(ctxt, qmlScope)); + QV4::Scoped<QV4::QmlContext> qmlContext(scope, QV4::QmlContext::create(v4->rootContext(), ctxt, qmlScope)); QV4::Script script(v4, qmlContext, code, filename, line); QV4::ScopedValue result(scope); script.parse(); |