summaryrefslogtreecommitdiffstats
path: root/src/linguist/lupdate/qdeclarative.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2015-01-09 10:38:37 +0100
committerStephan Binner <stephan.binner@basyskom.com>2015-01-12 09:00:05 +0100
commit82570bd5af4c6bcd2eeb6f4d356a56770bab65ef (patch)
tree39c89698fc9fca4f2d020b5d4312b1f88b313038 /src/linguist/lupdate/qdeclarative.cpp
parent2157653eb9ecf0bfeb5acd6125464d4377153311 (diff)
Fix build after commit 9d7b27f5bf44a46707e6d50ebf51ecf73f91dd1b in qtdeclarative
The commit integrates the .pragma and .import parsing in JavaScript files directly into the lexer. Previously the QML engine had a separate function for parsing those directives and replacing them with whitespace in the source. Similarly the code here tried to do the same. Fortunately this is not necessary anymore as the lexer now understands those directives and unless told otherwise will simply ignore them. Change-Id: If9888deb2c82a15d1727f4254d897fc9e7bcb832 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/linguist/lupdate/qdeclarative.cpp')
-rw-r--r--src/linguist/lupdate/qdeclarative.cpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/linguist/lupdate/qdeclarative.cpp b/src/linguist/lupdate/qdeclarative.cpp
index bbca7a002..315029d1e 100644
--- a/src/linguist/lupdate/qdeclarative.cpp
+++ b/src/linguist/lupdate/qdeclarative.cpp
@@ -468,24 +468,6 @@ static bool load(Translator &translator, const QString &filename, ConversionData
code = ts.readAll();
}
- if (! qmlMode) {
- // fetch the optional pragma directives for Javascript files.
-
- Lexer lex(/*engine=*/ 0);
- HasDirectives directives(&lex);
- lex.setCode(code, 1, qmlMode);
- if (lex.scanDirectives(&directives)) {
- if (directives()) {
- // replace directives with white space characters
- const int tokenOffset = directives.end();
- for (int i = 0; i < tokenOffset; ++i) {
- if (! code.at(i).isSpace())
- code[i] = QLatin1Char(' ');
- }
- }
- }
- }
-
Engine driver;
Parser parser(&driver);