diff options
author | Liang Qi <liang.qi@qt.io> | 2016-05-13 11:02:33 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-05-13 11:02:33 +0200 |
commit | 5b35c21437054148e867253f1ca2d740d465d047 (patch) | |
tree | 1877c84d75b2d0da72fd06515423dc7ada6ac1ad /tests | |
parent | b4fca58fbe488e034b762fbcf04bc7334efa2c86 (diff) | |
parent | 570f0f314cbe4603db34d4967b6a7dd35d174eba (diff) | |
download | qttools-5b35c21437054148e867253f1ca2d740d465d047.tar.gz |
Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: Idff3a769724c52de3806697df5b2850cf004d203
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp | 9 | ||||
-rw-r--r-- | tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result | 14 |
2 files changed, 23 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 d58ddf9fb..31783fd6a 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp @@ -507,3 +507,12 @@ class nullptrClass : public QObject tr("%n car(s)", nullptr, 2); } }; + + + +// QTBUG-34265: lupdate does not detect NULL and Q_NULLPTR as 0 when being passed as context +void nullMacroInPlural() +{ + QObject::tr("%n NULL(s)", NULL, 3); + QObject::tr("%n Q_NULLPTR(s)", Q_NULLPTR, 3); +} 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 be9df15ca..4f301b2db 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -319,6 +319,20 @@ backslashed \ stuff.</source> <numerusform></numerusform> </translation> </message> + <message numerus="yes"> + <location filename="main.cpp" line="516"/> + <source>%n NULL(s)</source> + <translation type="unfinished"> + <numerusform></numerusform> + </translation> + </message> + <message numerus="yes"> + <location filename="main.cpp" line="517"/> + <source>%n Q_NULLPTR(s)</source> + <translation type="unfinished"> + <numerusform></numerusform> + </translation> + </message> <message> <location filename="included.cpp" line="34"/> <source>message from #included .cpp file</source> |