aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlirbuilder_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2017-07-07 11:41:02 +0200
committerErik Verbruggen <erik.verbruggen@qt.io>2017-07-07 11:02:05 +0000
commit540bcf99c5f74f1c3eabdbd6b28265a47e52cd01 (patch)
tree63ff386a0fa89cb14748e2b0e2dbc67fa880ea44 /src/qml/compiler/qqmlirbuilder_p.h
parentd6615c16b4830af8abe1639c2790a41a249fcf7b (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/qqmlirbuilder_p.h')
-rw-r--r--src/qml/compiler/qqmlirbuilder_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/compiler/qqmlirbuilder_p.h b/src/qml/compiler/qqmlirbuilder_p.h
index 0aaf5aa624..62abff1bd6 100644
--- a/src/qml/compiler/qqmlirbuilder_p.h
+++ b/src/qml/compiler/qqmlirbuilder_p.h
@@ -502,6 +502,7 @@ public:
const QQmlJS::AST::SourceLocation &last) const;
void setBindingValue(QV4::CompiledData::Binding *binding, QQmlJS::AST::Statement *statement);
+ void tryGeneratingTranslationBinding(const QStringRef &base, QQmlJS::AST::ArgumentList *args, QV4::CompiledData::Binding *binding);
void appendBinding(QQmlJS::AST::UiQualifiedId *name, QQmlJS::AST::Statement *value);
void appendBinding(QQmlJS::AST::UiQualifiedId *name, int objectIndex, bool isOnAssignment = false);