aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-11-29 11:05:04 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2018-11-29 11:38:51 +0000
commit2fa1c92cb7e60f89e200eff48cf7e76d8d2febe6 (patch)
tree4b3218530ade7938bc25adcc4c43a6126866b29c /tests/auto/qml/qqmlecmascript
parent597ce09c7a1d8b89e9473faae900321ef2d4181d (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 'tests/auto/qml/qqmlecmascript')
-rw-r--r--tests/auto/qml/qqmlecmascript/data/js/include2.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlecmascript/data/js/include2.js b/tests/auto/qml/qqmlecmascript/data/js/include2.js
index 2a0c039dfa..7cfcdd95e2 100644
--- a/tests/auto/qml/qqmlecmascript/data/js/include2.js
+++ b/tests/auto/qml/qqmlecmascript/data/js/include2.js
@@ -2,3 +2,8 @@ test2 = true
var test2_1 = true
Qt.include("include3.js");
+
+function withTokensAllowedInJSButKeywordsInQML(char)
+{
+ var double;
+}