diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-07-07 11:41:02 +0200 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2017-07-07 11:02:05 +0000 |
commit | 540bcf99c5f74f1c3eabdbd6b28265a47e52cd01 (patch) | |
tree | 63ff386a0fa89cb14748e2b0e2dbc67fa880ea44 /src/qml/compiler/qqmltypecompiler.cpp | |
parent | d6615c16b4830af8abe1639c2790a41a249fcf7b (diff) |
Fix handling of qsTr & friends
Translation bindings have a special type. Previously, this was done as
a pass on the IR after constant folding: any binding that ended up being
a call to qsTr (and friends) was then changed to being a translation
binding.
Now that we cannot do that anymore, check the AST if the right-hand side
of a script binding is a call to qsTr, and go from there.
Change-Id: Ibd4f6bc947523652fe2319c1adec6f798b952bbf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qqmltypecompiler.cpp')
-rw-r--r-- | src/qml/compiler/qqmltypecompiler.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/qml/compiler/qqmltypecompiler.cpp b/src/qml/compiler/qqmltypecompiler.cpp index f51546739b..87c99016f8 100644 --- a/src/qml/compiler/qqmltypecompiler.cpp +++ b/src/qml/compiler/qqmltypecompiler.cpp @@ -147,11 +147,6 @@ QV4::CompiledData::CompilationUnit *QQmlTypeCompiler::compile() if (!jsCodeGen.generateCodeForComponents()) return nullptr; -#if 0 // ### - QQmlJavaScriptBindingExpressionSimplificationPass pass(document->objects, &document->jsModule, &document->jsGenerator); - pass.reduceTranslationBindings(); -#endif - document->javaScriptCompilationUnit = v4CodeGenerator.generateCompilationUnit(/*generated unit data*/false); } |