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/plugins/qmltooling/qmldbg_debugger/qv4debugjob.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/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp index a2d2fff72b..d5cc765ea8 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp @@ -41,6 +41,7 @@ #include <private/qv4script_p.h> #include <private/qqmlcontext_p.h> +#include <private/qv4qmlcontext_p.h> #include <private/qv4qobjectwrapper_p.h> #include <QtQml/qqmlengine.h> @@ -81,7 +82,7 @@ void JavaScriptJob::run() } } if (!engine->qmlContext()) { - engine->pushContext(ctx->newQmlContext(QQmlContextData::get(qmlRootContext), + engine->pushContext(QV4::QmlContext::create(ctx, QQmlContextData::get(qmlRootContext), &scopeObject)); ctx = engine->currentContext; } @@ -201,7 +202,7 @@ void ValueLookupJob::run() QV4::ExecutionEngine *engine = collector->engine(); if (engine->qmlEngine() && !engine->qmlContext()) { scopeObject.reset(new QObject); - engine->pushContext(engine->currentContext->newQmlContext( + engine->pushContext(QV4::QmlContext::create(engine->currentContext, QQmlContextData::get(engine->qmlEngine()->rootContext()), scopeObject.data())); } |