diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-03-26 21:32:05 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-02 14:17:13 +0000 |
commit | e9492e7b7b44c1f8cd5489d93463fc2b1f8b6d72 (patch) | |
tree | 01d8e52fe7841c91fd019219055796fcc8db22aa /tools | |
parent | 17f72f2d07352940b67a60c2ff6f7ef848793488 (diff) |
Rename the CompilationMode enum to ContextType
And make it an enum class. The new name fits better, as it's mainly
used to determine the type of the context when parsing. Also already
added the 'Block' value that will be needed.
Change-Id: I70d963b6a0b22db1a3c607cce6bdd2054b29e000
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qmlcachegen/qmlcachegen.cpp | 2 | ||||
-rw-r--r-- | tools/qmljs/qmljs.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/qmlcachegen/qmlcachegen.cpp b/tools/qmlcachegen/qmlcachegen.cpp index ff3a2d9cff..ed8b3c19a5 100644 --- a/tools/qmlcachegen/qmlcachegen.cpp +++ b/tools/qmlcachegen/qmlcachegen.cpp @@ -303,7 +303,7 @@ static bool compileJSFile(const QString &inputFileName, const QString &inputFile &irDocument.jsGenerator.stringTable, illegalNames); v4CodeGen.setUseFastLookups(false); // Disable lookups in non-standalone (aka QML) mode v4CodeGen.generateFromProgram(inputFileName, inputFileUrl, sourceCode, program, - &irDocument.jsModule, QV4::Compiler::GlobalCode); + &irDocument.jsModule, QV4::Compiler::ContextType::Global); QList<QQmlJS::DiagnosticMessage> jsErrors = v4CodeGen.errors(); if (!jsErrors.isEmpty()) { for (const QQmlJS::DiagnosticMessage &e: qAsConst(jsErrors)) { diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp index ea014f3beb..ecc2cf44c5 100644 --- a/tools/qmljs/qmljs.cpp +++ b/tools/qmljs/qmljs.cpp @@ -120,7 +120,7 @@ int main(int argc, char *argv[]) const QString code = QString::fromUtf8(file.readAll()); file.close(); - script.reset(new QV4::Script(ctx, QV4::Compiler::GlobalCode, code, fn)); + script.reset(new QV4::Script(ctx, QV4::Compiler::ContextType::Global, code, fn)); script->parseAsBinding = runAsQml; script->parse(); } |