diff options
-rw-r--r-- | src/qml/jsruntime/qv4scopedvalue_p.h | 4 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4script.cpp | 14 | ||||
-rw-r--r-- | src/qml/jsruntime/qv4script_p.h | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4scopedvalue_p.h b/src/qml/jsruntime/qv4scopedvalue_p.h index 575f4e6e3f..afb5c21d36 100644 --- a/src/qml/jsruntime/qv4scopedvalue_p.h +++ b/src/qml/jsruntime/qv4scopedvalue_p.h @@ -87,7 +87,7 @@ struct ScopedValue; return scope.engine->throwError(QString::fromUtf8(str)) struct Scope { - inline Scope(ExecutionContext *ctx) + explicit Scope(ExecutionContext *ctx) : engine(ctx->engine()) , mark(engine->jsStackTop) { @@ -99,7 +99,7 @@ struct Scope { { } - inline Scope(const Managed *m) + explicit Scope(const Managed *m) : engine(m->engine()) , mark(engine->jsStackTop) { diff --git a/src/qml/jsruntime/qv4script.cpp b/src/qml/jsruntime/qv4script.cpp index c3200fbcea..9850734aa1 100644 --- a/src/qml/jsruntime/qv4script.cpp +++ b/src/qml/jsruntime/qv4script.cpp @@ -61,7 +61,7 @@ using namespace QV4; Script::Script(ExecutionEngine *v4, QmlContext *qml, CompiledData::CompilationUnit *compilationUnit) - : line(1), column(0), scope(v4->rootContext()), strictMode(false), inheritContext(true), parsed(false) + : line(1), column(0), context(v4->rootContext()), strictMode(false), inheritContext(true), parsed(false) , compilationUnit(compilationUnit), vmFunction(0), parseAsBinding(true) { if (qml) @@ -85,7 +85,7 @@ void Script::parse() parsed = true; - ExecutionEngine *v4 = scope->engine(); + ExecutionEngine *v4 = context->engine(); Scope valueScope(v4); Module module(v4->debugger() != 0); @@ -143,18 +143,18 @@ ReturnedValue Script::run() if (!vmFunction) return Encode::undefined(); - QV4::ExecutionEngine *engine = scope->engine(); + QV4::ExecutionEngine *engine = context->engine(); QV4::Scope valueScope(engine); if (qmlContext.isUndefined()) { TemporaryAssignment<Function*> savedGlobalCode(engine->globalCode, vmFunction); - ContextStateSaver stateSaver(valueScope, scope); - scope->d()->v4Function = vmFunction; + ContextStateSaver stateSaver(valueScope, context); + context->d()->v4Function = vmFunction; - QV4::JSCall jsCall(scope, nullptr); + QV4::JSCall jsCall(valueScope, nullptr); jsCall->thisObject = engine->globalObject; - jsCall->context = *scope; + jsCall->context = *context; return vmFunction->call(jsCall); } else { Scoped<QmlContext> qml(valueScope, qmlContext.value()); diff --git a/src/qml/jsruntime/qv4script_p.h b/src/qml/jsruntime/qv4script_p.h index 8d7500eb13..f3a4853fa3 100644 --- a/src/qml/jsruntime/qv4script_p.h +++ b/src/qml/jsruntime/qv4script_p.h @@ -91,11 +91,11 @@ struct ContextStateSaver { struct Q_QML_EXPORT Script { Script(ExecutionContext *scope, QV4::Compiler::CompilationMode mode, const QString &sourceCode, const QString &source = QString(), int line = 1, int column = 0) : sourceFile(source), line(line), column(column), sourceCode(sourceCode) - , scope(scope), strictMode(false), inheritContext(false), parsed(false), compilationMode(mode) + , context(scope), strictMode(false), inheritContext(false), parsed(false), compilationMode(mode) , vmFunction(0), parseAsBinding(false) {} Script(ExecutionEngine *engine, QmlContext *qml, const QString &sourceCode, const QString &source = QString(), int line = 1, int column = 0) : sourceFile(source), line(line), column(column), sourceCode(sourceCode) - , scope(engine->rootContext()), strictMode(false), inheritContext(true), parsed(false) + , context(engine->rootContext()), strictMode(false), inheritContext(true), parsed(false) , vmFunction(0), parseAsBinding(true) { if (qml) qmlContext.set(engine, *qml); @@ -106,7 +106,7 @@ struct Q_QML_EXPORT Script { int line; int column; QString sourceCode; - ExecutionContext *scope; + ExecutionContext *context; bool strictMode; bool inheritContext; bool parsed; |