static initializers obviously cannot appear in scopes, so there is no
reason to suppress parsing tr() statements used for indexing inside
functions.
Task-number: QTBUG-29998
Change-Id: I3a0330e1382cd5a74106328ae6722a02af282f7f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
// so they don't confuse our scoping of static initializers.
// we enter the loop by either reading a left bracket or by an
// #else popping the state.
- if (yyBracketDepth) {
+ if (yyBracketDepth && yyBraceDepth == namespaceDepths.count()) {
yyTok = getToken();
continue;
}
}
}
+
+
+
+// QTBUG-29998: tr() macro inside square brackets
+void blubb()
+{
+ QMap<QString, QString> d;
+ d[LotsaFun::tr("bracketed")] = "plain";
+}
<source>this is inside operator<<</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="main.cpp" line="353"/>
+ <source>bracketed</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>NameSchpace::YetMoreFun</name>