summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp23
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result17
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
index 6e73d6d..0765bfc 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -252,3 +252,26 @@ class YetAnotherTest : QObject {
//: This is a message without a source string
QString test = qtTrId("yet_another_id");
+
+
+
+// QTBUG-9276: context in static initializers
+class Bogus : QObject {
+ Q_OBJECT
+
+ static const char * const s_strings[];
+};
+
+const char * const Bogus::s_strings[] = {
+ QT_TR_NOOP("this should be in Bogus")
+};
+
+const char * const Bogus::s_strings[SIZE] = {
+ QT_TR_NOOP("this should be in Bogus")
+};
+
+void bogosity()
+{
+ // no spaces here. test collateral damage from ignoring equal sign
+ Class::member=QObject::tr("just QObject");
+}
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
index 6d50c21..208191d 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -26,6 +26,15 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>Bogus</name>
+ <message>
+ <location filename="main.cpp" line="266"/>
+ <location filename="main.cpp" line="270"/>
+ <source>this should be in Bogus</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Dialog2</name>
<message numerus="yes">
<location filename="main.cpp" line="70"/>
@@ -184,6 +193,14 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>QObject</name>
+ <message>
+ <location filename="main.cpp" line="276"/>
+ <source>just QObject</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>QTranslator</name>
<message>
<location filename="main.cpp" line="93"/>