diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-07-26 17:54:36 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-01 13:37:25 +0200 |
commit | 30b07c744f980c46ea8dac5c68bb0b94eb070323 (patch) | |
tree | 223042fda7cf52b4ec79112be4ac48094b60fb68 /tests | |
parent | 1c7d9a533509d510047c1ff4045e88262139c6aa (diff) | |
download | qttools-30b07c744f980c46ea8dac5c68bb0b94eb070323.tar.gz qttools-30b07c744f980c46ea8dac5c68bb0b94eb070323.tar.bz2 qttools-30b07c744f980c46ea8dac5c68bb0b94eb070323.zip |
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')
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp | 13 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result | 5 |
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 792d0dc3..4f6de5c4 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 c7367cab..d7c2b144 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> |