diff options
| author | Simon Hausmann <simon.hausmann@qt.io> | 2018-11-29 11:05:04 +0100 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-11-29 11:38:51 +0000 |
| commit | 2fa1c92cb7e60f89e200eff48cf7e76d8d2febe6 (patch) | |
| tree | 4b3218530ade7938bc25adcc4c43a6126866b29c /src/qml/jsruntime/qv4include.cpp | |
| parent | 597ce09c7a1d8b89e9473faae900321ef2d4181d (diff) | |
Fix parsing of js files via Qt.include()
Make sure to parse them as JavaScript, not as QML, so that certain
keywords such as char or double map to identifiers as expected.
Also removed an unused function.
Fixes: QTBUG-71524
Change-Id: Ie8a8dabe717ee12def6af512943e6d01efcf9876
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4include.cpp')
| -rw-r--r-- | src/qml/jsruntime/qv4include.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4include.cpp b/src/qml/jsruntime/qv4include.cpp index e456879d9c..36569b0a60 100644 --- a/src/qml/jsruntime/qv4include.cpp +++ b/src/qml/jsruntime/qv4include.cpp @@ -166,7 +166,7 @@ void QV4Include::finished() QmlIR::Document::removeScriptPragmas(code); QV4::Scoped<QV4::QmlContext> qml(scope, m_qmlContext.value()); - QV4::Script script(v4, qml, code, m_url.toString()); + QV4::Script script(v4, qml, /*parse as QML binding*/false, code, m_url.toString()); script.parse(); if (!scope.engine->hasException) |
