aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-12-13 14:30:28 +0100
committerErik Verbruggen <erik.verbruggen@qt.io>2017-12-14 09:17:30 +0000
commita1fd2866465c4be2815a6ada776867b3d4efc557 (patch)
treedde453bc71f1aba07f570b0aed331f3904fec5f3 /src/qml/jsapi
parent904179cb681e28b248d892e699f5706666a1b4fc (diff)
Fix QJSEngine::evaluate regression
The compilation mode used in the evaluate method was changed to eval, breaking existing uses. This patch fixes that. Task-number: QTBUG-65167 Change-Id: I645ad50be36884eb10bf86ecf060b2b62b50f122 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsapi')
-rw-r--r--src/qml/jsapi/qjsengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index bca4057fbe..fffb190513 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -445,7 +445,7 @@ QJSValue QJSEngine::evaluate(const QString& program, const QString& fileName, in
QV4::Scope scope(v4);
QV4::ScopedValue result(scope);
- QV4::Script script(v4->rootContext(), QV4::Compiler::EvalCode, program, fileName, lineNumber);
+ QV4::Script script(v4->rootContext(), QV4::Compiler::GlobalCode, program, fileName, lineNumber);
script.strictMode = false;
if (v4->currentStackFrame)
script.strictMode = v4->currentStackFrame->v4Function->isStrict();