summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-05 14:19:02 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-11-06 21:58:01 (GMT)
commit0a1db39ba70060f305e5694d1a12dd3c2e5bca4c (patch)
tree0e5786d7497ac56e2ef0ba2a665c7b0d642a4c62 /tests
parenta66698f947e8ded2e020defa626b154aca1fde9f (diff)
downloadQt-0a1db39ba70060f305e5694d1a12dd3c2e5bca4c.zip
Qt-0a1db39ba70060f305e5694d1a12dd3c2e5bca4c.tar.gz
Qt-0a1db39ba70060f305e5694d1a12dd3c2e5bca4c.tar.bz2
record id-based messages even if they have an empty source
this makes sense if one uses lupdate only for validation purposes, i.e. to find out if the code uses only ids which are defined in some external specification.
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before4
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result6
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp5
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result6
5 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
index f27e1f0..5bd7a0a 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp
@@ -75,4 +75,8 @@ void FindDialog::reset()
//= new_id
tr("this is just some text");
+
+
+ //: A message without source string
+ qtTrId("qtn_virtual");
}
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
index ad2f65f..379cce4 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before
@@ -12,6 +12,10 @@
<source>World</source>
<translation>Welt</translation>
</message>
+ <message id="qtn_virtual">
+ <location filename="finddialog.cpp" line="79"/>
+ <extracomment>A message without source string</extracomment>
+ </message>
</context>
<context>
<name>FindDialog</name>
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
index e9abf89..de43266 100644
--- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result
@@ -14,6 +14,12 @@
<oldsource>World</oldsource>
<translation type="unfinished">Welt</translation>
</message>
+ <message id="qtn_virtual">
+ <location filename="finddialog.cpp" line="81"/>
+ <source></source>
+ <extracomment>A message without source string</extracomment>
+ <translation></translation>
+ </message>
</context>
<context>
<name>FindDialog</name>
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
index e243e66..386d9b7 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -247,3 +247,8 @@ class YetAnotherTest : QObject {
tr("nothing");
}
};
+
+
+
+//: This is a message without a source string
+QString test = qtTrId("yet_another_id");
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 26e5a65..6d50c21 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -18,6 +18,12 @@ backslashed \ stuff.</source>
</translation>
<extra-some>thing</extra-some>
</message>
+ <message id="yet_another_id">
+ <location filename="main.cpp" line="254"/>
+ <source></source>
+ <extracomment>This is a message without a source string</extracomment>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>Dialog2</name>