summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2016-04-06 12:42:27 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-04-06 12:42:51 +0200
commit887f86794c24c6e80cf49a2687b669d7530a1944 (patch)
tree9d08458d66b9621faf2d877879b5e3aa8faa30af /tests
parent790f59646d80e3b05d03aa8d3e2d9cc52eef68b9 (diff)
parentcf9129f19fb180d24f217897cc660ea7c6861e87 (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp19
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result27
2 files changed, 46 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 f4ac1e214..d58ddf9fb 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -488,3 +488,22 @@ class TernaryClass : public QObject
tr("ternary, ddd, false");
}
};
+
+
+
+// QTBUG-47467: lupdate confused by nullptr in case of plural forms
+void nullptrInPlural()
+{
+ QObject::tr("%n nullptr(s)", nullptr, 3);
+ QCoreApplication::translate("Plurals, nullptr", "%n car(s)", nullptr, QCoreApplication::UnicodeUTF8, 1);
+}
+
+class nullptrClass : public QObject
+{
+ Q_OBJECT
+
+ void f()
+ {
+ tr("%n car(s)", nullptr, 2);
+ }
+};
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 b847f8f89..be9df15ca 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -235,6 +235,16 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>Plurals, nullptr</name>
+ <message numerus="yes">
+ <location filename="main.cpp" line="498"/>
+ <source>%n car(s)</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ </translation>
+ </message>
+</context>
+<context>
<name>QApplication</name>
<message>
<location filename="main.cpp" line="43"/>
@@ -302,6 +312,13 @@ backslashed \ stuff.</source>
<extracomment>comment, bbb, false</extracomment>
<translation type="unfinished"></translation>
</message>
+ <message numerus="yes">
+ <location filename="main.cpp" line="497"/>
+ <source>%n nullptr(s)</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ </translation>
+ </message>
<message>
<location filename="included.cpp" line="34"/>
<source>message from #included .cpp file</source>
@@ -456,6 +473,16 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>nullptrClass</name>
+ <message numerus="yes">
+ <location filename="main.cpp" line="507"/>
+ <source>%n car(s)</source>
+ <translation type="unfinished">
+ <numerusform></numerusform>
+ </translation>
+ </message>
+</context>
+<context>
<name>scope</name>
<message numerus="yes">
<location filename="main.cpp" line="179"/>