aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/evaluatorscriptclass.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-01-10 17:14:01 +0100
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-01-11 13:05:26 +0000
commitb6f8541b24af369dee0bd28840c527cfeca256b0 (patch)
treefe38d89905bd57e79e20d3b6c44e78ec11c0cb5a /src/lib/corelib/language/evaluatorscriptclass.cpp
parentb63ed5750a1c904847ac89927974844e3f49554c (diff)
Remove superfluous QScriptEngine::currentContext calls
Change-Id: Id9bf393a0dd3ae9e57af52accb024d42ed1a932a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/lib/corelib/language/evaluatorscriptclass.cpp')
-rw-r--r--src/lib/corelib/language/evaluatorscriptclass.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/corelib/language/evaluatorscriptclass.cpp b/src/lib/corelib/language/evaluatorscriptclass.cpp
index c28404bd3..0b85472e1 100644
--- a/src/lib/corelib/language/evaluatorscriptclass.cpp
+++ b/src/lib/corelib/language/evaluatorscriptclass.cpp
@@ -196,25 +196,25 @@ private:
QBS_ASSERT(conditionScope.isObject(), return);
conditionFileScope = data->evaluator->fileScope(value->file());
}
- engine->currentContext()->pushScope(conditionFileScope);
+ scriptContext->pushScope(conditionFileScope);
pushItemScopes(conditionScopeItem);
if (alternative->value->definingItem())
pushItemScopes(alternative->value->definingItem());
- engine->currentContext()->pushScope(conditionScope);
+ scriptContext->pushScope(conditionScope);
const QScriptValue theImportScope = importScope(data->evaluator, value->file());
if (theImportScope.isError()) {
- engine->currentContext()->popScope();
- engine->currentContext()->popScope();
+ scriptContext->popScope();
+ scriptContext->popScope();
popScopes();
*result = theImportScope;
return;
}
- engine->currentContext()->pushScope(theImportScope);
+ scriptContext->pushScope(theImportScope);
const QScriptValue cr = engine->evaluate(alternative->condition);
const QScriptValue overrides = engine->evaluate(alternative->overrideListProperties);
- engine->currentContext()->popScope();
- engine->currentContext()->popScope();
- engine->currentContext()->popScope();
+ scriptContext->popScope();
+ scriptContext->popScope();
+ scriptContext->popScope();
popScopes();
if (engine->hasErrorOrException(cr)) {
*result = engine->lastErrorValue(cr);