diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-10 13:36:53 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2009-11-10 13:36:53 (GMT) |
commit | 7b15c669c336a1d76e3ac001fadde38a294e3e80 (patch) | |
tree | 2b8e9631019d1bc9af37d9a93bb93ce0eb16381a /tests | |
parent | 47bc34f413d9a0c6efac6ca3eead95eed7da2e40 (diff) | |
parent | 86048e1a09fce11f557d0e8b117229a754ee9098 (diff) | |
download | Qt-7b15c669c336a1d76e3ac001fadde38a294e3e80.zip Qt-7b15c669c336a1d76e3ac001fadde38a294e3e80.tar.gz Qt-7b15c669c336a1d76e3ac001fadde38a294e3e80.tar.bz2 |
Merge branch 'tools-team/4.6' (early part) into 4.6
Conflicts:
src/corelib/tools/qscopedpointer.h
Diffstat (limited to 'tests')
11 files changed, 126 insertions, 1 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp index 53eba32..5bd7a0a 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp @@ -63,5 +63,20 @@ void FindDialog::reset() { tr("%n item(s)", "merge from singular to plural form", 4); tr("%n item(s)", "merge from a finished singular form to an unfinished plural form", 4); -} + + + //% "Hello" + qtTrId("xx_hello"); + + //% "New world" + qtTrId("xx_world"); + + + //= 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 d06252c..379cce4 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before @@ -1,6 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS><TS version="1.1" language="zh_CN"> <context> + <name></name> + <message id="xx_hello"> + <location filename="finddialog.cpp" line="70"/> + <source>Hello</source> + <translation>Hallo</translation> + </message> + <message id="xx_world"> + <location filename="finddialog.cpp" line="73"/> + <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> <message> <source></source> @@ -44,5 +61,10 @@ <numerusform></numerusform> </translation> </message> + <message> + <location filename="finddialog.cpp" line="59"/> + <source>this is just some text</source> + <translation type="unfinished">Unfertige Uebersetzung</translation> + </message> </context> </TS> 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 be4e02e..de43266 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result @@ -2,6 +2,26 @@ <!DOCTYPE TS> <TS version="2.0" language="zh_CN"> <context> + <name></name> + <message id="xx_hello"> + <location filename="finddialog.cpp" line="70"/> + <source>Hello</source> + <translation>Hallo</translation> + </message> + <message id="xx_world"> + <location filename="finddialog.cpp" line="73"/> + <source>New world</source> + <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> <message> <source></source> @@ -45,5 +65,10 @@ <numerusform></numerusform> </translation> </message> + <message id="new_id"> + <location filename="finddialog.cpp" line="77"/> + <source>this is just some text</source> + <translation type="unfinished">Unfertige Uebersetzung</translation> + </message> </context> </TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp index e1464a2..9abb367 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp @@ -148,4 +148,7 @@ void FindDialog::doFind(bool forward) bool FindDialog::hasFindExpression() const { // statusMessage(tr( "Should be obsolete" )); + + //% "This is some random text" + qtTrId("keep_id") } diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before index 834f512..feab169 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.before @@ -1,6 +1,19 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS><TS version="1.1"> <context> + <name></name> + <message id="keep_id"> + <location filename="finddialog.cpp" line="153"/> + <source>This is some random text</source> + <translation type="unfinished"></translation> + </message> + <message id="obsolete_id"> + <location filename="finddialog.cpp" line="155"/> + <source>Should be obsolete, too</source> + <translation type="unfinished">SHOULD BE OBSOLETE AS WELL</translation> + </message> +</context> +<context> <name>FindDialog</name> <message> <location filename="finddialog.cpp" line="85"/> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result index b328e90..ee3d0f6 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/project.ts.result @@ -2,6 +2,14 @@ <!DOCTYPE TS> <TS version="2.0"> <context> + <name></name> + <message id="keep_id"> + <location filename="finddialog.cpp" line="153"/> + <source>This is some random text</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> <name>FindDialog</name> <message> <location filename="finddialog.cpp" line="85"/> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp index 7b28c75..cc3af48 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp @@ -150,6 +150,9 @@ void FindDialog::doFind(bool forward) bool FindDialog::hasFindExpression() const { + //% "This is some random text" + qtTrId("keep_id") + return !findExpr.isEmpty(); } diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before index 1fa0fd3..2bc6049 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.before @@ -1,6 +1,19 @@ <?xml version="1.0"?> <!DOCTYPE TS><TS version="1.1"> <context> + <name></name> + <message id="keep_id"> + <location filename="finddialog.cpp" line="154"/> + <source>This is some random text</source> + <translation type="unfinished"></translation> + </message> + <message id="obsolete_id"> + <location filename="finddialog.cpp" line="155"/> + <source>Should be obsolete, too</source> + <translation type="unfinished">SHOULD BE OBSOLETE AS WELL</translation> + </message> +</context> +<context> <name>FindDialog</name> <message> <location filename="finddialog.cpp" line="85"/> diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result index cfd11b1..f442cbc 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/project.ts.result @@ -2,6 +2,18 @@ <!DOCTYPE TS> <TS version="2.0"> <context> + <name></name> + <message id="keep_id"> + <location filename="finddialog.cpp" line="154"/> + <source>This is some random text</source> + <translation type="unfinished"></translation> + </message> + <message id="obsolete_id"> + <source>Should be obsolete, too</source> + <translation type="obsolete">SHOULD BE OBSOLETE AS WELL</translation> + </message> +</context> +<context> <name>FindDialog</name> <message> <source>Enter the text you are looking for.</source> 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> |