summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2016-04-06 15:59:04 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-04-06 15:59:25 +0200
commit89c1b65cade37657084c9fa9ccda2c838107e919 (patch)
tree9a6dee7fb2d861110e59f4a6837ff7bfcb967ca6 /tests
parent973c68374ce076f349a3a81c7f8d2a9d5fde04a6 (diff)
parent5aa96caa3c602367a61b613a5810f13cf2502464 (diff)
downloadqttools-89c1b65cade37657084c9fa9ccda2c838107e919.tar.gz
Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I6cc44e077f16ecfbe7153048539e8a5ce0c17f1e
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
{