summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
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
-rw-r--r--tests/manual/uiloader/uiloader/tst_uiloader.cpp4
3 files changed, 46 insertions, 4 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"/>
diff --git a/tests/manual/uiloader/uiloader/tst_uiloader.cpp b/tests/manual/uiloader/uiloader/tst_uiloader.cpp
index cf6e3851b..a0fda4cef 100644
--- a/tests/manual/uiloader/uiloader/tst_uiloader.cpp
+++ b/tests/manual/uiloader/uiloader/tst_uiloader.cpp
@@ -38,10 +38,6 @@
#include <QApplication>
#include <QDir>
-#ifdef Q_OS_SYMBIAN
-#define SRCDIR ""
-#endif
-
class uiLoaderAutotest: public QObject
{