summaryrefslogtreecommitdiff
path: root/tests/auto/linguist/lupdate/testdata
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2013-07-26 17:54:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-01 13:37:25 +0200
commit30b07c744f980c46ea8dac5c68bb0b94eb070323 (patch)
tree223042fda7cf52b4ec79112be4ac48094b60fb68 /tests/auto/linguist/lupdate/testdata
parent1c7d9a533509d510047c1ff4045e88262139c6aa (diff)
downloadqttools-30b07c744f980c46ea8dac5c68bb0b94eb070323.tar.gz
make QT_TR_NOOP work in static initializers, take 2
simply ignoring equal signs turns out to be not so smart: there are static initializers without braces, which consequently do not look like function definitions with a weird additional char. Task-number: QTBUG-9276 Change-Id: I7d200aee7b81f17b42866eca4830be388c8edb64 Reviewed-by: hjk <hjk121@nokiamail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp13
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result5
2 files changed, 18 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 792d0dc3a..4f6de5c42 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -352,3 +352,16 @@ void blubb()
QMap<QString, QString> d;
d[LotsaFun::tr("bracketed")] = "plain";
}
+
+
+
+// QTBUG-9276 part 2: QT_TR_NOOP in static member initializers
+class TestClass
+{
+ Q_DECLARE_TR_FUNCTIONS(TestClass);
+
+public:
+ static const char TEST_STRING[];
+};
+
+const char TestClass::TEST_STRING[] = QT_TR_NOOP("Test value");
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 c7367cab5..d7c2b1448 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -292,6 +292,11 @@ backslashed \ stuff.</source>
<comment>TestClass</comment>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <location filename="main.cpp" line="367"/>
+ <source>Test value</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>Testing</name>