diff options
author | David Boddie <dboddie@trolltech.com> | 2009-08-27 17:17:43 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2009-08-27 17:17:43 (GMT) |
commit | 81fc91183fd12cff512ac20ed265b6c0b44b2f30 (patch) | |
tree | cee6735f83fadc0a10d999a8baacf441da302069 /tests | |
parent | 34d66c954e85fddd50d3a8712e0e8dc985d3414c (diff) | |
parent | 1241aa609bb1621e6377920219b6d18a1203e50a (diff) | |
download | Qt-81fc91183fd12cff512ac20ed265b6c0b44b2f30.zip Qt-81fc91183fd12cff512ac20ed265b6c0b44b2f30.tar.gz Qt-81fc91183fd12cff512ac20ed265b6c0b44b2f30.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'tests')
87 files changed, 2977 insertions, 217 deletions
diff --git a/tests/auto/atwrapper/scruffy.ini b/tests/auto/atwrapper/scruffy.ini index 1a99f89..329f537 100644 --- a/tests/auto/atwrapper/scruffy.ini +++ b/tests/auto/atwrapper/scruffy.ini @@ -1,7 +1,7 @@ [General] framework=data/framework.ini ftpBaseDir=/arthurtest -ftpHost=kramer.troll.no +ftpHost=kramer.nokia.troll.no ftpPass=anonymouspass ftpUser=anonymous output=testresults diff --git a/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp b/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp index 348a6be..805e87a 100644 --- a/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/backslashes/src/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! // diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp index 2573fbb..c6275ca 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> #include <QtGui> #include <QtCore> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result index e746c7e..bc0d9bb 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecforsrc/project.ts.result @@ -5,13 +5,13 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>abc</source> <comment>ascii</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source>æøå</source> <comment>utf-8</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp index 79b0503..91b3678 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> #include <QtGui> #include <QtCore> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result index 9a082ef..91da744 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr/project.ts.result @@ -5,7 +5,7 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="20"/> + <location filename="main.cpp" line="61"/> <source>Á</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp index 91af165..daabfe1 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtCore> class FooBar : QObject diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result index 5ffa2f3..26eb245 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr1/project.ts.result @@ -5,22 +5,22 @@ <context> <name>FooBar</name> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>random ascii only</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source>this contains an umlaut ü &uuml;</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source>random ascii only in utf8</source> <translation type="unfinished"></translation> </message> <message utf8="true"> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>umlaut ü &uuml; in utf8</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp index 91af165..daabfe1 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtCore> class FooBar : QObject diff --git a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result index 0ebdbfd..e27c157 100644 --- a/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/codecfortr2/project.ts.result @@ -5,22 +5,22 @@ <context> <name>FooBar</name> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>random ascii only</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source>this contains an umlaut ü &uuml;</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source>random ascii only in utf8</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>umlaut ü &uuml; in utf8</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp index 0e42d52..d30a10e 100644 --- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result index bab0881..bc876cd 100644 --- a/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/lacksqobject/project.ts.result @@ -4,7 +4,7 @@ <context> <name>B</name> <message> - <location filename="main.cpp" line="17"/> + <location filename="main.cpp" line="58"/> <source>Bla</source> <comment>::B</comment> <translation type="unfinished"></translation> @@ -13,7 +13,7 @@ <context> <name>C</name> <message> - <location filename="main.cpp" line="24"/> + <location filename="main.cpp" line="65"/> <source>Bla</source> <comment>::C</comment> <translation type="unfinished"></translation> @@ -22,7 +22,7 @@ <context> <name>nsB::B</name> <message> - <location filename="main.cpp" line="37"/> + <location filename="main.cpp" line="78"/> <source>Bla</source> <comment>nsB::B</comment> <translation type="unfinished"></translation> @@ -31,7 +31,7 @@ <context> <name>nsB::C</name> <message> - <location filename="main.cpp" line="43"/> + <location filename="main.cpp" line="84"/> <source>Bla</source> <comment>nsB::C</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp index af8534d..91484bf 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/foo.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ // The first line in this file should always be empty, its part of the test!! class Foo : public QObject diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before index d70193f..1762cc7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.before @@ -3,22 +3,22 @@ <context> <name>Bar</name> <message> - <location filename="bar1.cpp" line="13"/> + <location filename="bar1.cpp" line="54"/> <source>Another alien.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="bar1.cpp" line="14"/> + <location filename="bar1.cpp" line="55"/> <source>They are coming!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="bar1.cpp" line="16"/> + <location filename="bar1.cpp" line="57"/> <source>They are everywhere!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="bar1.cpp" line="18"/> + <location filename="bar1.cpp" line="59"/> <source>This one moved in from another file.</source> <translation type="unfinished"></translation> </message> @@ -26,47 +26,47 @@ <context> <name>Foo</name> <message> - <location filename="foo1.cpp" line="13"/> + <location filename="foo1.cpp" line="54"/> <source>This is the first entry.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="14"/> + <location filename="foo1.cpp" line="55"/> <source>A second message.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="15"/> + <location filename="foo1.cpp" line="56"/> <source>Now again one which is just where it was.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="16"/> + <location filename="foo1.cpp" line="57"/> <source>Just as this one.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="17"/> + <location filename="foo1.cpp" line="58"/> <source>An earthling again.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="18"/> + <location filename="foo1.cpp" line="59"/> <source>This is from the bottom, too.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="19"/> + <location filename="foo1.cpp" line="60"/> <source>Third string from the bottom.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="20"/> + <location filename="foo1.cpp" line="61"/> <source>Fourth one!</source> <translation type="unfinished"></translation> </message> <message> - <location filename="foo1.cpp" line="21"/> + <location filename="foo1.cpp" line="62"/> <source>This string did move from the bottom.</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result index 2027efd..5104860 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/merge_ordering/project.ts.result @@ -4,7 +4,7 @@ <context> <name>Foo</name> <message> - <location filename="foo.cpp" line="+13"/> + <location filename="foo.cpp" line="+54"/> <source>This is the first entry.</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp index e058da0..4dddace 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QApplication> #include <QDebug> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before index 3acae3e..0f84fed 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.before @@ -10,57 +10,57 @@ newline at the start</source> NEWLINE AT THE START</translation> </message> <message> - <location filename="main.cpp" line="8"/> + <location filename="main.cpp" line="49"/> <source>newline at the end </source> <translation>NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="9"/> + <location filename="main.cpp" line="50"/> <source>newline and space at the end </source> <translation>NEWLINE AND SPACE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>space and newline at the end </source> <translation>SPACE AND NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source><byte value="x9"/>Tab at the start and newline at the end </source> <translation><byte value="x9"/>TAB AT THE START AND NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source> <byte value="x9"/>newline and tab at the start</source> <translation> <byte value="x9"/>NEWLINE AND TAB AT THE START</translation> </message> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source> <byte value="x9"/>space and tab at the start</source> <translation> <byte value="x9"/>SPACE AND TAB AT THE START</translation> </message> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source> space_first</source> <translation> SPACE_FIRST</translation> </message> <message> - <location filename="main.cpp" line="15"/> + <location filename="main.cpp" line="56"/> <source>space_last </source> <translation>SPACE_LAST </translation> </message> <message> - <location filename="main.cpp" line="21"/> + <location filename="main.cpp" line="62"/> <source>carriage return and line feed last<byte value="xd"/> </source> <translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST<byte value="xd"/> diff --git a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result index 6d6b469..776238d 100644 --- a/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/merge_whitespace/project.ts.result @@ -4,64 +4,64 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="12"/> + <location filename="main.cpp" line="53"/> <source> newline at the start</source> <translation> NEWLINE AT THE START</translation> </message> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>newline at the end </source> <translation>NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source>newline and space at the end </source> <translation>NEWLINE AND SPACE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="15"/> + <location filename="main.cpp" line="56"/> <source>space and newline at the end </source> <translation>SPACE AND NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="16"/> + <location filename="main.cpp" line="57"/> <source> Tab at the start and newline at the end </source> <translation> TAB AT THE START AND NEWLINE AT THE END </translation> </message> <message> - <location filename="main.cpp" line="17"/> + <location filename="main.cpp" line="58"/> <source> newline and tab at the start</source> <translation> NEWLINE AND TAB AT THE START</translation> </message> <message> - <location filename="main.cpp" line="18"/> + <location filename="main.cpp" line="59"/> <source> space and tab at the start</source> <translation> SPACE AND TAB AT THE START</translation> </message> <message> - <location filename="main.cpp" line="19"/> + <location filename="main.cpp" line="60"/> <source> space_first</source> <translation> SPACE_FIRST</translation> </message> <message> - <location filename="main.cpp" line="20"/> + <location filename="main.cpp" line="61"/> <source>space_last </source> <translation>SPACE_LAST </translation> </message> <message> - <location filename="main.cpp" line="21"/> + <location filename="main.cpp" line="62"/> <source>carriage return and line feed last </source> <translation type="unfinished">CARRIAGE RETURN AND LINE FEED LAST diff --git a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp index 7edb923..ce35e5b 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/finddialog.cpp @@ -1,5 +1,47 @@ // The first line in this file should always be empty, its part of the test!! + +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + class FindDialog : public QDialog { Q_OBJECT 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 474444f..d06252c 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.before @@ -9,27 +9,27 @@ <translation></translation> </message> <message> - <location filename="finddialog.cpp" line="14"/> + <location filename="finddialog.cpp" line="56"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="15"/> + <location filename="finddialog.cpp" line="57"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="16"/> + <location filename="finddialog.cpp" line="58"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="17"/> + <location filename="finddialog.cpp" line="59"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="finddialog.cpp" line="22"/> + <location filename="finddialog.cpp" line="64"/> <source>%n item(s)</source> <comment>merge from singular to plural form</comment> <translation type="unfinished"> @@ -37,7 +37,7 @@ </translation> </message> <message numerus="yes"> - <location filename="finddialog.cpp" line="23"/> + <location filename="finddialog.cpp" line="65"/> <source>%n item(s)</source> <comment>merge from a finished singular form to an unfinished plural form</comment> <translation type="unfinished"> 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 152b568..be4e02e 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp/project.ts.result @@ -10,27 +10,27 @@ <translation></translation> </message> <message> - <location filename="finddialog.cpp" line="14"/> + <location filename="finddialog.cpp" line="56"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="15"/> + <location filename="finddialog.cpp" line="57"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="16"/> + <location filename="finddialog.cpp" line="58"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="17"/> + <location filename="finddialog.cpp" line="59"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="finddialog.cpp" line="22"/> + <location filename="finddialog.cpp" line="64"/> <source>%n item(s)</source> <comment>merge from singular to plural form</comment> <translation type="unfinished"> @@ -38,7 +38,7 @@ </translation> </message> <message numerus="yes"> - <location filename="finddialog.cpp" line="23"/> + <location filename="finddialog.cpp" line="65"/> <source>%n item(s)</source> <comment>merge from a finished singular form to an unfinished plural form</comment> <translation type="unfinished"> 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 7215ebe..528e795 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_noobsolete/finddialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "finddialog.h" #include "mainwindow.h" #include "tabbedbrowser.h" @@ -10,18 +51,83 @@ #include <QDateTime> #include <QGridLayout> +CaseSensitiveModel::CaseSensitiveModel(int rows, int columns, QObject *parent) + : QStandardItemModel(rows, columns, parent) +{} +QModelIndexList CaseSensitiveModel::match(const QModelIndex &start, int role, const QVariant &value, + int hits, Qt::MatchFlags flags) const +{ + if (flags == Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) + flags |= Qt::MatchCaseSensitive; + + return QStandardItemModel::match(start, role, value, hits, flags); +} + FindDialog::FindDialog(MainWindow *parent) : QDialog(parent) { + contentsWidget = new QWidget(this); + ui.setupUi(contentsWidget); + ui.comboFind->setModel(new CaseSensitiveModel(0, 1, ui.comboFind)); + + QVBoxLayout *l = new QVBoxLayout(this); + l->setMargin(0); + l->setSpacing(0); + l->addWidget(contentsWidget); + + lastBrowser = 0; + onceFound = false; + findExpr.clear(); + sb = new QStatusBar(this); l->addWidget(sb); sb->showMessage(tr("Enter the text you want to find.")); + connect(ui.findButton, SIGNAL(clicked()), this, SLOT(findButtonClicked())); + connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(reject())); +} + +FindDialog::~FindDialog() +{ +} + +void FindDialog::findButtonClicked() +{ + doFind(ui.radioForward->isChecked()); } void FindDialog::doFind(bool forward) { + QTextBrowser *browser = static_cast<QTextBrowser*>(mainWindow()->browsers()->currentBrowser()); + sb->clearMessage(); + + if (ui.comboFind->currentText() != findExpr || lastBrowser != browser) + onceFound = false; + findExpr = ui.comboFind->currentText(); + + QTextDocument::FindFlags flags = 0; + + if (ui.checkCase->isChecked()) + flags |= QTextDocument::FindCaseSensitively; + + if (ui.checkWords->isChecked()) + flags |= QTextDocument::FindWholeWords; + + QTextCursor c = browser->textCursor(); + if (!c.hasSelection()) { + if (forward) + c.movePosition(QTextCursor::Start); + else + c.movePosition(QTextCursor::End); + + browser->setTextCursor(c); + } + + QTextDocument::FindFlags options; + if (forward == false) + flags |= QTextDocument::FindBackward; + QTextCursor found = browser->document()->find(findExpr, c, flags); if (found.isNull()) { if (onceFound) { @@ -35,6 +141,8 @@ void FindDialog::doFind(bool forward) } else { browser->setTextCursor(found); } + onceFound |= !found.isNull(); + lastBrowser = browser; } bool FindDialog::hasFindExpression() const 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 12e30b5..834f512 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 @@ -3,27 +3,27 @@ <context> <name>FindDialog</name> <message> - <location filename="finddialog.cpp" line="57"/> + <location filename="finddialog.cpp" line="85"/> <source>Enter the text you want to find.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="107"/> + <location filename="finddialog.cpp" line="135"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="109"/> + <location filename="finddialog.cpp" line="137"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="111"/> + <location filename="finddialog.cpp" line="139"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="122"/> + <location filename="finddialog.cpp" line="150"/> <source>Should be obsolete</source> <translation type="unfinished">SHOULD BE OBSOLETE</translation> </message> 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 756c9a3..4abbda9 100644 --- a/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/mergecpp_obsolete/finddialog.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include "finddialog.h" #include "mainwindow.h" #include "tabbedbrowser.h" @@ -10,17 +51,86 @@ #include <QDateTime> #include <QGridLayout> +CaseSensitiveModel::CaseSensitiveModel(int rows, int columns, QObject *parent) + : QStandardItemModel(rows, columns, parent) +{} +QModelIndexList CaseSensitiveModel::match(const QModelIndex &start, int role, const QVariant &value, + int hits, Qt::MatchFlags flags) const +{ + if (flags == Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) + flags |= Qt::MatchCaseSensitive; + + return QStandardItemModel::match(start, role, value, hits, flags); +} + FindDialog::FindDialog(MainWindow *parent) : QDialog(parent) { + contentsWidget = new QWidget(this); + ui.setupUi(contentsWidget); + ui.comboFind->setModel(new CaseSensitiveModel(0, 1, ui.comboFind)); + + QVBoxLayout *l = new QVBoxLayout(this); + l->setMargin(0); + l->setSpacing(0); + l->addWidget(contentsWidget); + + lastBrowser = 0; + onceFound = false; + findExpr.clear(); + + sb = new QStatusBar(this); + l->addWidget(sb); + + // Move it to another line and change the text, // then lupdate should add this one as a new one, and mark the old one as obsolete. sb->showMessage(tr("Enter the text you want to find.")); + connect(ui.findButton, SIGNAL(clicked()), this, SLOT(findButtonClicked())); + connect(ui.closeButton, SIGNAL(clicked()), this, SLOT(reject())); +} + +FindDialog::~FindDialog() +{ +} + +void FindDialog::findButtonClicked() +{ + doFind(ui.radioForward->isChecked()); } void FindDialog::doFind(bool forward) { + QTextBrowser *browser = static_cast<QTextBrowser*>(mainWindow()->browsers()->currentBrowser()); + sb->clearMessage(); + + if (ui.comboFind->currentText() != findExpr || lastBrowser != browser) + onceFound = false; + findExpr = ui.comboFind->currentText(); + + QTextDocument::FindFlags flags = 0; + + if (ui.checkCase->isChecked()) + flags |= QTextDocument::FindCaseSensitively; + + if (ui.checkWords->isChecked()) + flags |= QTextDocument::FindWholeWords; + + QTextCursor c = browser->textCursor(); + if (!c.hasSelection()) { + if (forward) + c.movePosition(QTextCursor::Start); + else + c.movePosition(QTextCursor::End); + + browser->setTextCursor(c); + } + + QTextDocument::FindFlags options; + if (forward == false) + flags |= QTextDocument::FindBackward; + QTextCursor found = browser->document()->find(findExpr, c, flags); if (found.isNull()) { if (onceFound) { @@ -34,4 +144,31 @@ void FindDialog::doFind(bool forward) } else { browser->setTextCursor(found); } + onceFound |= !found.isNull(); + lastBrowser = browser; +} + +bool FindDialog::hasFindExpression() const +{ + return !findExpr.isEmpty(); +} + +void FindDialog::statusMessage(const QString &message) +{ + if (isVisible()) + sb->showMessage(message); + else + static_cast<MainWindow*>(parent())->statusBar()->showMessage(message, 2000); +} + +MainWindow *FindDialog::mainWindow() const +{ + return static_cast<MainWindow*>(parentWidget()); +} + +void FindDialog::reset() +{ + ui.comboFind->setFocus(); + ui.comboFind->lineEdit()->setSelection( + 0, ui.comboFind->lineEdit()->text().length()); } 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 271cc39..1fa0fd3 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 @@ -3,22 +3,22 @@ <context> <name>FindDialog</name> <message> - <location filename="finddialog.cpp" line="57"/> + <location filename="finddialog.cpp" line="85"/> <source>Enter the text you are looking for.</source> <translation type="unfinished">Skriv inn teksten du soker etter</translation> </message> <message> - <location filename="finddialog.cpp" line="107"/> + <location filename="finddialog.cpp" line="135"/> <source>Search reached end of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="109"/> + <location filename="finddialog.cpp" line="137"/> <source>Search reached start of the document</source> <translation type="unfinished"></translation> </message> <message> - <location filename="finddialog.cpp" line="111"/> + <location filename="finddialog.cpp" line="139"/> <source>Text not found</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp index c3881d3..5a69326 100644 --- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/finddialog.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ QT_TRANSLATE_NOOP("context", "just a message") diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp index 71d9085..e14b638 100644 --- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/main.cpp @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ diff --git a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result index dd013fa..ec1f02f 100644 --- a/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/multiple_locations/project.ts.result @@ -4,9 +4,9 @@ <context> <name>context</name> <message> - <location filename="finddialog.cpp" line="2"/> - <location filename="finddialog.cpp" line="7"/> - <location filename="main.cpp" line="6"/> + <location filename="finddialog.cpp" line="43"/> + <location filename="finddialog.cpp" line="48"/> + <location filename="main.cpp" line="47"/> <source>just a message</source> <extracomment>This is one comment ---------- diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp index 9f5a98c..62b306f 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + #include <QtCore> class Class : public QObject diff --git a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result index d1193d3..bb5b739 100644 --- a/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/namespaces/project.ts.result @@ -4,17 +4,17 @@ <context> <name>Class</name> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="52"/> <source>nested class context</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="17"/> + <location filename="main.cpp" line="58"/> <source>just class context</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="77"/> + <location filename="main.cpp" line="118"/> <source>outestmost class</source> <translation type="unfinished"></translation> </message> @@ -22,7 +22,7 @@ <context> <name>Outer::Class</name> <message> - <location filename="main.cpp" line="78"/> + <location filename="main.cpp" line="119"/> <source>outer class</source> <translation type="unfinished"></translation> </message> @@ -30,7 +30,7 @@ <context> <name>Outer::Middle1::Different</name> <message> - <location filename="main.cpp" line="65"/> + <location filename="main.cpp" line="106/> <source>different namespaced class def</source> <translation type="unfinished"></translation> </message> @@ -38,22 +38,22 @@ <context> <name>Outer::Middle1::Inner1::Class</name> <message> - <location filename="main.cpp" line="79"/> + <location filename="main.cpp" line="120"/> <source>innermost one</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="80"/> + <location filename="main.cpp" line="121"/> <source>innermost two</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="81"/> + <location filename="main.cpp" line="122"/> <source>innermost three</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="83"/> + <location filename="main.cpp" line="124"/> <source>innermost four</source> <translation type="unfinished"></translation> </message> @@ -61,12 +61,12 @@ <context> <name>Outer::Middle1::Something</name> <message> - <location filename="main.cpp" line="90"/> + <location filename="main.cpp" line="131"/> <source>namespaced class def</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="93"/> + <location filename="main.cpp" line="134"/> <source>namespaced class def 2</source> <translation type="unfinished"></translation> </message> @@ -74,7 +74,7 @@ <context> <name>Outer::Middle2::Inner2::Class</name> <message> - <location filename="main.cpp" line="82"/> + <location filename="main.cpp" line="123"/> <source>innermost three b</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp index 72a1590..c64c111 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result index a49b47a..0394bea 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parse_special_chars/project.ts.result @@ -4,12 +4,12 @@ <context> <name>Dialog2</name> <message> - <location filename="main.cpp" line="13"/> + <location filename="main.cpp" line="54"/> <source>catégorie</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="15"/> + <location filename="main.cpp" line="56"/> <source>Für Èlise</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp index 65eeed5..c2eba71 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! #include <QtCore> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result index 04bb3ae..9b00d53 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecontexts/project.ts.result @@ -4,7 +4,7 @@ <context> <name>A1::AB</name> <message> - <location filename="main.cpp" line="137"/> + <location filename="main.cpp" line="178"/> <source>inlineFuncAfterFriendDeclaration</source> <comment>A1::AB</comment> <translation type="unfinished"></translation> @@ -13,7 +13,7 @@ <context> <name>A1::B</name> <message> - <location filename="main.cpp" line="143"/> + <location filename="main.cpp" line="184"/> <source>foo</source> <comment>A1::B</comment> <translation type="unfinished"></translation> @@ -22,19 +22,19 @@ <context> <name>A1::B2</name> <message> - <location filename="main.cpp" line="188"/> + <location filename="main.cpp" line="229"/> <source>test TRANSLATOR comment (2)</source> <comment>A1::B2</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="194"/> + <location filename="main.cpp" line="235"/> <source>test TRANSLATOR comment (4)</source> <comment>A1::B2</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="203"/> + <location filename="main.cpp" line="244"/> <source>test TRANSLATOR comment (5)</source> <comment>A1::B2</comment> <translation type="unfinished"></translation> @@ -43,7 +43,7 @@ <context> <name>A1::B3::C2</name> <message> - <location filename="main.cpp" line="220"/> + <location filename="main.cpp" line="261"/> <source>test TRANSLATOR comment (6)</source> <comment>A1::B3::C2</comment> <translation type="unfinished"></translation> @@ -52,7 +52,7 @@ <context> <name>A1::V</name> <message> - <location filename="main.cpp" line="150"/> + <location filename="main.cpp" line="191"/> <source>bar</source> <comment>A1::V</comment> <translation type="unfinished"></translation> @@ -61,7 +61,7 @@ <context> <name>A1::W</name> <message> - <location filename="main.cpp" line="156"/> + <location filename="main.cpp" line="197"/> <source>baz</source> <comment>A1::W</comment> <translation type="unfinished"></translation> @@ -70,14 +70,14 @@ <context> <name>A::C</name> <message> - <location filename="main.cpp" line="28"/> - <location filename="main.cpp" line="32"/> + <location filename="main.cpp" line="69"/> + <location filename="main.cpp" line="73"/> <source>Bla</source> <comment>A::C</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="37"/> + <location filename="main.cpp" line="78"/> <source>Bla 2</source> <comment>A::C</comment> <translation type="unfinished"></translation> @@ -86,7 +86,7 @@ <context> <name>B1</name> <message> - <location filename="main.cpp" line="178"/> + <location filename="main.cpp" line="219"/> <source>test TRANSLATOR comment (1)</source> <comment>B1</comment> <translation type="unfinished"></translation> @@ -95,7 +95,7 @@ <context> <name>B2</name> <message> - <location filename="main.cpp" line="197"/> + <location filename="main.cpp" line="238"/> <source></source> <comment>This is a comment to the translator.</comment> <translation type="unfinished"></translation> @@ -104,7 +104,7 @@ <context> <name>C1</name> <message> - <location filename="main.cpp" line="189"/> + <location filename="main.cpp" line="230"/> <source>test TRANSLATOR comment (3)</source> <comment>C1</comment> <translation type="unfinished"></translation> @@ -113,7 +113,7 @@ <context> <name>D</name> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source>test</source> <comment>D</comment> <translation type="unfinished"></translation> @@ -122,7 +122,7 @@ <context> <name>Gui::MainWindow</name> <message> - <location filename="main.cpp" line="122"/> + <location filename="main.cpp" line="163"/> <source>More bla</source> <comment>Gui::MainWindow</comment> <translation type="unfinished"></translation> @@ -131,7 +131,7 @@ <context> <name>QObject</name> <message> - <location filename="main.cpp" line="100"/> + <location filename="main.cpp" line="141"/> <source>task 161186</source> <comment>QObject</comment> <translation type="unfinished"></translation> @@ -140,13 +140,13 @@ <context> <name>X::D</name> <message> - <location filename="main.cpp" line="54"/> + <location filename="main.cpp" line="95"/> <source>foo</source> <comment>D</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="74"/> + <location filename="main.cpp" line="115"/> <source>Bla</source> <comment>X::D</comment> <translation type="unfinished"></translation> @@ -155,7 +155,7 @@ <context> <name>X::F</name> <message> - <location filename="main.cpp" line="87"/> + <location filename="main.cpp" line="128"/> <source>inline function</source> <comment>X::F</comment> <translation type="unfinished"></translation> @@ -164,7 +164,7 @@ <context> <name>X::Y::C</name> <message> - <location filename="main.cpp" line="70"/> + <location filename="main.cpp" line="111"/> <source>Bla</source> <comment>X::Y::C</comment> <translation type="unfinished"></translation> @@ -173,8 +173,8 @@ <context> <name>X::Y::E</name> <message> - <location filename="main.cpp" line="78"/> - <location filename="main.cpp" line="79"/> + <location filename="main.cpp" line="119"/> + <location filename="main.cpp" line="120"/> <source>Bla</source> <comment>X::Y::E</comment> <translation type="unfinished"></translation> @@ -183,7 +183,7 @@ <context> <name>ico::foo::A</name> <message> - <location filename="main.cpp" line="99"/> + <location filename="main.cpp" line="140"/> <source>myfoo</source> <comment>ico::foo::A</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp index 735e4cd..50b835b 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! int main(char **argv, int argc) 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 8c48245..9e4e319 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result @@ -22,7 +22,7 @@ backslashed \ stuff.</source> <context> <name>Dialog2</name> <message numerus="yes"> - <location filename="main.cpp" line="29"/> + <location filename="main.cpp" line="70"/> <source>%n files</source> <comment>plural form</comment> <translation type="unfinished"> @@ -30,40 +30,40 @@ backslashed \ stuff.</source> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="30"/> + <location filename="main.cpp" line="71"/> <source>%n cars</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="31"/> + <location filename="main.cpp" line="72"/> <source>&Find %n cars</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="32"/> + <location filename="main.cpp" line="73"/> <source>Search in %n items?</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="33"/> + <location filename="main.cpp" line="74"/> <source>%1. Search in %n items?</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message> - <location filename="main.cpp" line="34"/> + <location filename="main.cpp" line="75"/> <source>Age: %1</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="35"/> + <location filename="main.cpp" line="76"/> <source>There are %n house(s)</source> <comment>Plurals and function call</comment> <translation type="unfinished"> @@ -71,7 +71,7 @@ backslashed \ stuff.</source> </translation> </message> <message> - <location filename="main.cpp" line="102"/> + <location filename="main.cpp" line="143"/> <source>func3</source> <translation type="unfinished"></translation> </message> @@ -115,7 +115,7 @@ backslashed \ stuff.</source> <context> <name>Plurals, QCoreApplication</name> <message numerus="yes"> - <location filename="main.cpp" line="40"/> + <location filename="main.cpp" line="81"/> <source>%n house(s)</source> <comment>Plurals and identifier</comment> <translation type="unfinished"> @@ -123,7 +123,7 @@ backslashed \ stuff.</source> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="41"/> + <location filename="main.cpp" line="82"/> <source>%n car(s)</source> <comment>Plurals and literal number</comment> <translation type="unfinished"> @@ -131,7 +131,7 @@ backslashed \ stuff.</source> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="42"/> + <location filename="main.cpp" line="83"/> <source>%n horse(s)</source> <comment>Plurals and function call</comment> <translation type="unfinished"> @@ -142,7 +142,7 @@ backslashed \ stuff.</source> <context> <name>QApplication</name> <message> - <location filename="main.cpp" line="10"/> + <location filename="main.cpp" line="51"/> <source>QT_LAYOUT_DIRECTION</source> <comment>Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment> <translation type="unfinished"></translation> @@ -180,26 +180,26 @@ backslashed \ stuff.</source> <context> <name>QTranslator</name> <message> - <location filename="main.cpp" line="52"/> - <location filename="main.cpp" line="53"/> + <location filename="main.cpp" line="93"/> + <location filename="main.cpp" line="94"/> <source>Simple</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="54"/> + <location filename="main.cpp" line="95"/> <source>Simple with comment</source> <comment>with comment</comment> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="55"/> + <location filename="main.cpp" line="96"/> <source>Plural without comment</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="56"/> + <location filename="main.cpp" line="97"/> <source>Plural with comment</source> <comment>comment 1</comment> <translation type="unfinished"> @@ -207,7 +207,7 @@ backslashed \ stuff.</source> </translation> </message> <message numerus="yes"> - <location filename="main.cpp" line="57"/> + <location filename="main.cpp" line="98"/> <source>Plural with comment</source> <comment>comment 2</comment> <translation type="unfinished"> @@ -218,19 +218,19 @@ backslashed \ stuff.</source> <context> <name>TestClass</name> <message> - <location filename="main.cpp" line="116"/> + <location filename="main.cpp" line="157"/> <source>inline function</source> <comment>TestClass</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="120"/> + <location filename="main.cpp" line="161"/> <source>inline function 2</source> <comment>TestClass</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="124"/> + <location filename="main.cpp" line="165"/> <source>static inline function</source> <comment>TestClass</comment> <translation type="unfinished"></translation> @@ -239,18 +239,18 @@ backslashed \ stuff.</source> <context> <name>Testing</name> <message> - <location filename="main.cpp" line="141"/> + <location filename="main.cpp" line="182"/> <source>extra-commented string</source> <extracomment>this is an extra comment for the translator</extracomment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="142"/> + <location filename="main.cpp" line="183"/> <source>not extra-commented string</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="144"/> + <location filename="main.cpp" line="185"/> <source>another extra-commented string</source> <extracomment>another extra-comment</extracomment> <translation type="unfinished"></translation> @@ -280,7 +280,7 @@ backslashed \ stuff.</source> <context> <name>scope</name> <message numerus="yes"> - <location filename="main.cpp" line="146"/> + <location filename="main.cpp" line="187"/> <source>works in translate, too</source> <comment>blabb</comment> <extracomment>blah!</extracomment> @@ -289,20 +289,20 @@ backslashed \ stuff.</source> </translation> </message> <message> - <location filename="main.cpp" line="153"/> + <location filename="main.cpp" line="194"/> <source>string</source> <extracomment>extra comment for NOOP which spans multiple lines</extracomment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="155"/> + <location filename="main.cpp" line="196"/> <source>string</source> <comment>comment</comment> <extracomment>extra comment for NOOP3</extracomment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="157"/> + <location filename="main.cpp" line="198"/> <source>string continuation on next line</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java b/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java index 07681d2..1167e87 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java +++ b/tests/auto/linguist/lupdate/testdata/good/parsejava/main.java @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result index 69c0a00..0ce600c 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsejava/project.ts.result @@ -4,7 +4,7 @@ <context> <name>Plurals, QCoreApplication</name> <message numerus="yes"> - <location filename="main.java" line="47"/> + <location filename="main.java" line="88"/> <source>%n house(s)</source> <comment>Plurals and identifier</comment> <extracomment>with extra comment!</extracomment> @@ -16,26 +16,26 @@ <context> <name>QTranslator</name> <message> - <location filename="main.java" line="39"/> - <location filename="main.java" line="40"/> + <location filename="main.java" line="80"/> + <location filename="main.java" line="81"/> <source>Simple</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.java" line="41"/> + <location filename="main.java" line="82"/> <source>Simple with comment</source> <comment>with comment</comment> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.java" line="42"/> + <location filename="main.java" line="83"/> <source>Plural without comment</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message numerus="yes"> - <location filename="main.java" line="43"/> + <location filename="main.java" line="84"/> <source>Plural with comment</source> <comment>comment 1</comment> <translation type="unfinished"> @@ -43,7 +43,7 @@ </translation> </message> <message numerus="yes"> - <location filename="main.java" line="44"/> + <location filename="main.java" line="85"/> <source>Plural with comment</source> <comment>comment 2</comment> <translation type="unfinished"> @@ -54,18 +54,18 @@ <context> <name>com.trolltech.examples.I18N</name> <message> - <location filename="main.java" line="26"/> + <location filename="main.java" line="67"/> <source>pack class method</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.java" line="31"/> + <location filename="main.java" line="72"/> <source>QT_LAYOUT_DIRECTION</source> <comment>Translate this string to the string 'LTR' in left-to-right languages or to 'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.java" line="33"/> + <location filename="main.java" line="74"/> <source>%n files</source> <comment>plural form</comment> <translation type="unfinished"> @@ -73,19 +73,19 @@ </translation> </message> <message numerus="yes"> - <location filename="main.java" line="34"/> + <location filename="main.java" line="75"/> <source>%n cars</source> <translation type="unfinished"> <numerusform></numerusform> </translation> </message> <message> - <location filename="main.java" line="35"/> + <location filename="main.java" line="76"/> <source>Age: %1</source> <translation type="unfinished"></translation> </message> <message numerus="yes"> - <location filename="main.java" line="36"/> + <location filename="main.java" line="77"/> <source>There are %n house(s)</source> <comment>Plurals and function call</comment> <translation type="unfinished"> @@ -96,18 +96,18 @@ <context> <name>com.trolltech.examples.I18N$MainWindow</name> <message> - <location filename="main.java" line="9"/> + <location filename="main.java" line="50"/> <source>pack class class</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.java" line="12"/> + <location filename="main.java" line="53"/> <source>pack class class extra</source> <extracomment>extra comment for t-tor</extracomment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.java" line="18"/> + <location filename="main.java" line="59"/> <source>pack class class method</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp b/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp index d845853..7ad8407 100644 --- a/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/prefix/main.cpp @@ -1,4 +1,43 @@ - +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ QString foo() diff --git a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result index 5ced00d..c15b986 100644 --- a/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/prefix/project.ts.result @@ -4,18 +4,18 @@ <context> <name>Foo</name> <message> - <location filename="main.cpp" line="6"/> + <location filename="main.cpp" line="46"/> <source>XXX</source> <comment>YYY</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="11"/> + <location filename="main.cpp" line="51"/> <source>CTOR</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="16"/> + <location filename="main.cpp" line="56"/> <source>BAR</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp b/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp index 9abfa5e..c4f67a8 100644 --- a/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/preprocess/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result index 3aec045..4d695e8 100644 --- a/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/preprocess/project.ts.result @@ -4,30 +4,30 @@ <context> <name>QApplication</name> <message> - <location filename="main.cpp" line="6"/> + <location filename="main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="14"/> + <location filename="main.cpp" line="55"/> <source>Kind</source> <comment>Windows only, see Type</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="16"/> + <location filename="main.cpp" line="57"/> <source>Type</source> <comment>Not used on windows, see Kind</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="25"/> + <location filename="main.cpp" line="66"/> <source>One string, three lines</source> <translation type="unfinished"></translation> </message> <message> - <location filename="main.cpp" line="29"/> + <location filename="main.cpp" line="70"/> <source>a backslash followed by newline should be ignored and the next line should be syntactically considered to be on the same line</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp index 236bbe7..9064b56 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp index 845aaa6..4cfec14 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_mac.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp index 229e154..c15c2f7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp index 4eb39f7..b879aa7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/main_win.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result index ef98596..556ca07 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/project.ts.result @@ -4,49 +4,49 @@ <context> <name>QApplication</name> <message> - <location filename="main.cpp" line="6"/> + <location filename="main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main_mac.cpp" line="6"/> + <location filename="main_mac.cpp" line="47"/> <source>Hello macworld</source> <comment>mac-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main_unix.cpp" line="6"/> + <location filename="main_unix.cpp" line="47"/> <source>Hello unixworld</source> <comment>unix-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="main_win.cpp" line="6"/> + <location filename="main_win.cpp" line="47"/> <source>Hello windowsworld</source> <comment>Windows-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="wildcard/main1.cpp" line="6"/> + <location filename="wildcard/main1.cpp" line="47"/> <source>Hello world</source> <comment>wildcard/main1.cpp</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="wildcard/mainfile.cpp" line="6"/> + <location filename="wildcard/mainfile.cpp" line="47"/> <source>Hello world</source> <comment>wildcard/main2.cpp</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="wildcard1.cpp" line="6"/> + <location filename="wildcard1.cpp" line="47"/> <source>Hello world</source> <comment>wildcard1.cpp</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="wildcard99.cpp" line="6"/> + <location filename="wildcard99.cpp" line="47"/> <source>Hello world</source> <comment>wildcard99.cpp</comment> <translation type="unfinished"></translation> @@ -55,7 +55,7 @@ <context> <name>QCoreApplication</name> <message> - <location filename="vpaths/dependpath/main_dependpath.cpp" line="7"/> + <location filename="vpaths/dependpath/main_dependpath.cpp" line="48"/> <source>Hello from a DEPENDPATH</source> <comment>See if the DEPENDPATH thing works</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp index f019c79..f12ce98 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/vpaths/dependpath/main_dependpath.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp index 506ae42..fdc5ca4 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/main1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp index f4cd00a..a5d5783 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard/mainfile.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp index c7790c5..bfe651c 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp index 93febda..9f7e3cd 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing/wildcard99.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a index 5966392..d3abf47 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("a"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp index 1d80ed3..5f0f7ef 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/a.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("a.cpp"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b index d0fe066..40ab4f4 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("b"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp index a5c386d..5feb1e7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/b.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("b.cpp"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/e b/tests/auto/linguist/lupdate/testdata/good/proparsing2/e index 66e89a8..ffb7dd6 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/e +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/e @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("e"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp index d86bee2..1eeac23 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/f/g.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("f/g.cpp"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result index 2e60696..3714d9b 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/project.ts.result @@ -4,57 +4,57 @@ <context> <name>QLineEdit</name> <message> - <location filename="a" line="3"/> + <location filename="a" line="44"/> <source>a</source> <translation type="unfinished"></translation> </message> <message> - <location filename="a.cpp" line="3"/> + <location filename="a.cpp" line="44"/> <source>a.cpp</source> <translation type="unfinished"></translation> </message> <message> - <location filename="b" line="3"/> + <location filename="b" line="44"/> <source>b</source> <translation type="unfinished"></translation> </message> <message> - <location filename="b.cpp" line="3"/> + <location filename="b.cpp" line="44"/> <source>b.cpp</source> <translation type="unfinished"></translation> </message> <message> - <location filename="e" line="3"/> + <location filename="e" line="44"/> <source>e</source> <translation type="unfinished"></translation> </message> <message> - <location filename="f/g.cpp" line="3"/> + <location filename="f/g.cpp" line="44"/> <source>f/g.cpp</source> <translation type="unfinished"></translation> </message> <message> - <location filename="spaces/z" line="3"/> + <location filename="spaces/z" line="44"/> <source>spaces/z</source> <translation type="unfinished"></translation> </message> <message> - <location filename="variable_with_spaces" line="3"/> + <location filename="variable_with_spaces" line="44"/> <source>variable with spaces</source> <translation type="unfinished"></translation> </message> <message> - <location filename="with" line="3"/> + <location filename="with" line="44"/> <source>with</source> <translation type="unfinished"></translation> </message> <message> - <location filename="x/d" line="3"/> + <location filename="x/d" line="44"/> <source>x/d</source> <translation type="unfinished"></translation> </message> <message> - <location filename="x/variable" line="3"/> + <location filename="x/variable" line="44"/> <source>x/variable</source> <translation type="unfinished"></translation> </message> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z b/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z index 34364d6..4b237dc 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/spaces/z @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("spaces/z"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces b/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces index cf56fc4..6ce9ff0 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/variable_with_spaces @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("variable with spaces"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/with b/tests/auto/linguist/lupdate/testdata/good/proparsing2/with index a156ca1..b2a1e57 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/with +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/with @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("with"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d index e2effde..30ab25a 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/d @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("x/d"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable index a86e387..a6093aa 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable +++ b/tests/auto/linguist/lupdate/testdata/good/proparsing2/x/variable @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + QString func() { return QLineEdit::tr("x/variable"); diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp index ad87e70..e1876c8 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/file1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp index 912963d..2e40b44 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/filter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result index 470d6eb..edc2fcb 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/project.ts.result @@ -4,25 +4,25 @@ <context> <name>QApplication</name> <message> - <location filename="file1.cpp" line="6"/> + <location filename="file1.cpp" line="47"/> <source>Hello world</source> <comment>top-level wildcard</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="filter.cpp" line="6"/> + <location filename="filter.cpp" line="47"/> <source>Hello world</source> <comment>top-level direct</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/subfile1.cpp" line="6"/> + <location filename="sub/subfile1.cpp" line="47"/> <source>Hello world</source> <comment>nested wildcard</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="sub/subfilter.cpp" line="6"/> + <location filename="sub/subfilter.cpp" line="47"/> <source>Hello world</source> <comment>nested direct</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp index 807d296..91fe89e 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfile1.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp index 6e5dd25..b72253f 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpaths/sub/subfilter.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp index 236bbe7..9064b56 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/common/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp index 845aaa6..4cfec14 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/mac/main_mac.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result index c64ba82..e01c533 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/project.ts.result @@ -4,31 +4,31 @@ <context> <name>QApplication</name> <message> - <location filename="common/main.cpp" line="6"/> + <location filename="common/main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="mac/main_mac.cpp" line="6"/> + <location filename="mac/main_mac.cpp" line="47"/> <source>Hello macworld</source> <comment>mac-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="relativity/relativity.cpp" line="6"/> + <location filename="relativity/relativity.cpp" line="47"/> <source>relativity.pri</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="unix/main_unix.cpp" line="6"/> + <location filename="unix/main_unix.cpp" line="47"/> <source>Hello unixworld</source> <comment>unix-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="win/main_win.cpp" line="6"/> + <location filename="win/main_win.cpp" line="47"/> <source>Hello windowsworld</source> <comment>Windows-only file</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp index 83ae7d5..a23e65a 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/relativity/relativity.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp index 229e154..c15c2f7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/unix/main_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp index 4eb39f7..b879aa7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingpri/win/main_win.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result index 5914d0b..a6972bd 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/project.ts.result @@ -4,7 +4,7 @@ <context> <name>QApplication</name> <message> - <location filename="sub1/main.cpp" line="6"/> + <location filename="sub1/main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp index 236bbe7..9064b56 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubdirs/sub1/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp index 236bbe7..9064b56 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/common/main.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp index 845aaa6..4cfec14 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/mac/main_mac.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result index c0352fb..6621de9 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/project.ts.result @@ -4,25 +4,25 @@ <context> <name>QApplication</name> <message> - <location filename="win/main_win.cpp" line="6"/> + <location filename="win/main_win.cpp" line="47"/> <source>Hello windowsworld</source> <comment>Windows-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="mac/main_mac.cpp" line="6"/> + <location filename="mac/main_mac.cpp" line="47"/> <source>Hello macworld</source> <comment>mac-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="unix/main_unix.cpp" line="6"/> + <location filename="unix/main_unix.cpp" line="47"/> <source>Hello unixworld</source> <comment>unix-only file</comment> <translation type="unfinished"></translation> </message> <message> - <location filename="common/main.cpp" line="6"/> + <location filename="common/main.cpp" line="47"/> <source>Hello world</source> <comment>Platform-independent file</comment> <translation type="unfinished"></translation> diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp index 229e154..c15c2f7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/unix/main_unix.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp index 4eb39f7..b879aa7 100644 --- a/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp +++ b/tests/auto/linguist/lupdate/testdata/good/proparsingsubs/win/main_win.cpp @@ -1,3 +1,44 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the either Technology Preview License Agreement or the +** Beta Release License Agreement. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain +** additional rights. These rights are described in the Nokia Qt LGPL +** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this +** package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** If you are unsure which license is appropriate for your use, please +** contact the sales department at http://qt.nokia.com/contact. +** $QT_END_LICENSE$ +** +****************************************************************************/ + // IMPORTANT!!!! If you want to add testdata to this file, // always add it to the end in order to not change the linenumbers of translations!!! diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp index b568c60..dac32bb 100644 --- a/tests/auto/qcombobox/tst_qcombobox.cpp +++ b/tests/auto/qcombobox/tst_qcombobox.cpp @@ -145,6 +145,8 @@ private slots: void noScrollbar(); void setItemDelegate(); void task253944_itemDelegateIsReset(); + void subControlRectsWithOffset_data(); + void subControlRectsWithOffset(); protected slots: void onEditTextChanged( const QString &newString ); @@ -2289,5 +2291,53 @@ void tst_QComboBox::task253944_itemDelegateIsReset() } +void tst_QComboBox::subControlRectsWithOffset_data() +{ + QTest::addColumn<bool>("editable"); + + QTest::newRow("editable = true") << true; + QTest::newRow("editable = false") << false; +} + +void tst_QComboBox::subControlRectsWithOffset() +{ + // The sub control rect relative position should not depends + // on the position of the combobox + + class FriendlyCombo : public QComboBox { + public: + void styleOption(QStyleOptionComboBox *optCombo) { + initStyleOption(optCombo); + } + } combo; + QStyleOptionComboBox optCombo; + combo.styleOption(&optCombo); + + + const QRect rectAtOrigin(0, 0, 80, 30); + const QPoint offset(25, 50); + const QRect rectWithOffset = rectAtOrigin.translated(offset); + + QStyle *style = combo.style(); + + QFETCH(bool, editable); + optCombo.editable = editable; + + optCombo.rect = rectAtOrigin; + QRect editFieldRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxEditField, 0); + QRect arrowRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxArrow, 0); + QRect listboxRect = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxListBoxPopup, 0); + + optCombo.rect = rectWithOffset; + QRect editFieldRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxEditField, 0); + QRect arrowRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxArrow, 0); + QRect listboxRectWithOffset = style->subControlRect(QStyle::CC_ComboBox, &optCombo, QStyle::SC_ComboBoxListBoxPopup, 0); + + QCOMPARE(editFieldRect, editFieldRectWithOffset.translated(-offset)); + QCOMPARE(arrowRect, arrowRectWithOffset.translated(-offset)); + QCOMPARE(listboxRect, listboxRectWithOffset.translated(-offset)); + +} + QTEST_MAIN(tst_QComboBox) #include "tst_qcombobox.moc" diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index f92670d..8958530 100644 --- a/tests/auto/qgl/tst_qgl.cpp +++ b/tests/auto/qgl/tst_qgl.cpp @@ -46,9 +46,11 @@ #include <qdebug.h> #include <qgl.h> #include <qglcolormap.h> +#include <qpaintengine.h> #include <QGraphicsView> #include <QGraphicsProxyWidget> +#include <QVBoxLayout> //TESTED_CLASS= //TESTED_FILES= @@ -67,6 +69,8 @@ private slots: void graphicsViewClipping(); void partialGLWidgetUpdates_data(); void partialGLWidgetUpdates(); + void glWidgetRendering(); + void glWidgetReparent(); void colormap(); }; @@ -625,6 +629,116 @@ void tst_QGL::partialGLWidgetUpdates() QCOMPARE(widget.paintEventRegion, QRegion(widget.rect())); } + +class GLWidget : public QGLWidget +{ +public: + GLWidget(QWidget* p = 0) + : QGLWidget(p), beginOk(false), engineType(QPaintEngine::MaxUser) {} + bool beginOk; + QPaintEngine::Type engineType; + void paintGL() + { + QPainter p; + beginOk = p.begin(this); + QPaintEngine* pe = p.paintEngine(); + engineType = pe->type(); + + // This test only ensures it's possible to paint onto a QGLWidget. Full + // paint engine feature testing is way out of scope! + + p.fillRect(0, 0, width(), height(), Qt::red); + // No p.end() or swap buffers, should be done automatically + } + +}; + +void tst_QGL::glWidgetRendering() +{ + GLWidget w; + w.show(); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&w); +#endif + QTest::qWait(200); + + QVERIFY(w.beginOk); + QVERIFY(w.engineType == QPaintEngine::OpenGL); + + QImage fb = w.grabFrameBuffer(false).convertToFormat(QImage::Format_RGB32); + QImage reference(fb.size(), QImage::Format_RGB32); + reference.fill(0xffff0000); + + QCOMPARE(fb, reference); +} + +void tst_QGL::glWidgetReparent() +{ + // Try it as a top-level first: + GLWidget *widget = new GLWidget; + widget->setGeometry(0, 0, 200, 30); + widget->show(); + + QWidget grandParentWidget; + grandParentWidget.setPalette(Qt::blue); + QVBoxLayout grandParentLayout(&grandParentWidget); + + QWidget parentWidget(&grandParentWidget); + grandParentLayout.addWidget(&parentWidget); + parentWidget.setPalette(Qt::green); + parentWidget.setAutoFillBackground(true); + QVBoxLayout parentLayout(&parentWidget); + + grandParentWidget.setGeometry(0, 100, 200, 200); + grandParentWidget.show(); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(widget); + qt_x11_wait_for_window_manager(&parentWidget); +#endif + QTest::qWait(2000); + + QVERIFY(parentWidget.children().count() == 1); // The layout + + // Now both widgets should be created & shown, time to re-parent: + parentLayout.addWidget(widget); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&parentWidget); +#endif + QTest::qWait(2000); + + QVERIFY(parentWidget.children().count() == 2); // Layout & glwidget + QVERIFY(parentWidget.children().contains(widget)); + QVERIFY(widget->height() > 30); + + delete widget; + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&parentWidget); +#endif + QTest::qWait(2000); + + QVERIFY(parentWidget.children().count() == 1); // The layout + + // Now do pretty much the same thing, but don't show the + // widget first: + widget = new GLWidget; + parentLayout.addWidget(widget); + +#ifdef Q_WS_X11 + qt_x11_wait_for_window_manager(&parentWidget); +#endif + QTest::qWait(2000); + + QVERIFY(parentWidget.children().count() == 2); // Layout & glwidget + QVERIFY(parentWidget.children().contains(widget)); + QVERIFY(widget->height() > 30); + + delete widget; +} + class ColormapExtended : public QGLColormap { public: diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index e9154d4..ba27c85 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -287,6 +287,8 @@ private slots: void focusProxyDeletion(); void negativeZStacksBehindParent(); void setGraphicsEffect(); + void panel(); + void addPanelToActiveScene(); // task specific tests below me void task141694_textItemEnsureVisible(); @@ -2922,7 +2924,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() int npaints = tester->repaints; qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 2); // enter + move + QCOMPARE(tester->events.size(), 3); // activate + enter + move QCOMPARE(tester->repaints, npaints + 1); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverMove); @@ -2936,7 +2938,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 3); + QCOMPARE(tester->events.size(), 4); QCOMPARE(tester->repaints, npaints + 1); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverMove); @@ -2950,7 +2952,7 @@ void tst_QGraphicsItem::hoverEventsGenerateRepaints() qApp->processEvents(); qApp->processEvents(); - QCOMPARE(tester->events.size(), 4); + QCOMPARE(tester->events.size(), 5); QCOMPARE(tester->repaints, npaints + 2); QCOMPARE(tester->events.last(), QEvent::GraphicsSceneHoverLeave); } @@ -7764,5 +7766,181 @@ void tst_QGraphicsItem::setGraphicsEffect() delete anotherItem; } +void tst_QGraphicsItem::panel() +{ + QGraphicsScene scene; + + QGraphicsRectItem *panel1 = new QGraphicsRectItem; + QGraphicsRectItem *panel2 = new QGraphicsRectItem; + QGraphicsRectItem *panel3 = new QGraphicsRectItem; + QGraphicsRectItem *panel4 = new QGraphicsRectItem; + QGraphicsRectItem *notPanel1 = new QGraphicsRectItem; + QGraphicsRectItem *notPanel2 = new QGraphicsRectItem; + panel1->setFlag(QGraphicsItem::ItemIsPanel); + panel2->setFlag(QGraphicsItem::ItemIsPanel); + panel3->setFlag(QGraphicsItem::ItemIsPanel); + panel4->setFlag(QGraphicsItem::ItemIsPanel); + scene.addItem(panel1); + scene.addItem(panel2); + scene.addItem(panel3); + scene.addItem(panel4); + scene.addItem(notPanel1); + scene.addItem(notPanel2); + + EventSpy spy_activate_panel1(&scene, panel1, QEvent::WindowActivate); + EventSpy spy_deactivate_panel1(&scene, panel1, QEvent::WindowDeactivate); + EventSpy spy_activate_panel2(&scene, panel2, QEvent::WindowActivate); + EventSpy spy_deactivate_panel2(&scene, panel2, QEvent::WindowDeactivate); + EventSpy spy_activate_panel3(&scene, panel3, QEvent::WindowActivate); + EventSpy spy_deactivate_panel3(&scene, panel3, QEvent::WindowDeactivate); + EventSpy spy_activate_panel4(&scene, panel4, QEvent::WindowActivate); + EventSpy spy_deactivate_panel4(&scene, panel4, QEvent::WindowDeactivate); + EventSpy spy_activate_notPanel1(&scene, notPanel1, QEvent::WindowActivate); + EventSpy spy_deactivate_notPanel1(&scene, notPanel1, QEvent::WindowDeactivate); + EventSpy spy_activate_notPanel2(&scene, notPanel1, QEvent::WindowActivate); + EventSpy spy_deactivate_notPanel2(&scene, notPanel1, QEvent::WindowDeactivate); + + QCOMPARE(spy_activate_panel1.count(), 0); + QCOMPARE(spy_deactivate_panel1.count(), 0); + QCOMPARE(spy_activate_panel2.count(), 0); + QCOMPARE(spy_deactivate_panel2.count(), 0); + QCOMPARE(spy_activate_panel3.count(), 0); + QCOMPARE(spy_deactivate_panel3.count(), 0); + QCOMPARE(spy_activate_panel4.count(), 0); + QCOMPARE(spy_deactivate_panel4.count(), 0); + QCOMPARE(spy_activate_notPanel1.count(), 0); + QCOMPARE(spy_deactivate_notPanel1.count(), 0); + QCOMPARE(spy_activate_notPanel2.count(), 0); + QCOMPARE(spy_deactivate_notPanel2.count(), 0); + + QVERIFY(!scene.activePanel()); + QVERIFY(!scene.isActive()); + + QEvent activate(QEvent::WindowActivate); + QEvent deactivate(QEvent::WindowDeactivate); + + QApplication::sendEvent(&scene, &activate); + + // No previous activation, so the scene is active. + QVERIFY(scene.isActive()); + QVERIFY(!scene.activePanel()); + QVERIFY(!panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(notPanel1->isActive()); + QVERIFY(notPanel2->isActive()); + QCOMPARE(spy_activate_notPanel1.count(), 1); + QCOMPARE(spy_activate_notPanel2.count(), 1); + + // Switch to panel1. + scene.setActivePanel(panel1); + QVERIFY(panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(!notPanel1->isActive()); + QVERIFY(!notPanel2->isActive()); + QCOMPARE(spy_deactivate_notPanel1.count(), 1); + QCOMPARE(spy_deactivate_notPanel2.count(), 1); + QCOMPARE(spy_activate_panel1.count(), 1); + QCOMPARE(spy_activate_panel2.count(), 0); + QCOMPARE(spy_activate_panel3.count(), 0); + QCOMPARE(spy_activate_panel4.count(), 0); + + // Switch back to scene. + scene.setActivePanel(0); + QVERIFY(!scene.activePanel()); + QVERIFY(!panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(notPanel1->isActive()); + QVERIFY(notPanel2->isActive()); + QCOMPARE(spy_activate_notPanel1.count(), 2); + QCOMPARE(spy_activate_notPanel2.count(), 2); + + // Deactivate the scene + QApplication::sendEvent(&scene, &deactivate); + QVERIFY(!scene.activePanel()); + QVERIFY(!panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(!notPanel1->isActive()); + QVERIFY(!notPanel2->isActive()); + QCOMPARE(spy_deactivate_notPanel1.count(), 2); + QCOMPARE(spy_deactivate_notPanel2.count(), 2); + + // Reactivate the scene + QApplication::sendEvent(&scene, &activate); + QVERIFY(!scene.activePanel()); + QVERIFY(!panel1->isActive()); + QVERIFY(!panel2->isActive()); + QVERIFY(!panel3->isActive()); + QVERIFY(!panel4->isActive()); + QVERIFY(notPanel1->isActive()); + QVERIFY(notPanel2->isActive()); + QCOMPARE(spy_activate_notPanel1.count(), 3); + QCOMPARE(spy_activate_notPanel2.count(), 3); + + // Switch to panel1 + scene.setActivePanel(panel1); + QVERIFY(panel1->isActive()); + QCOMPARE(spy_deactivate_notPanel1.count(), 3); + QCOMPARE(spy_deactivate_notPanel2.count(), 3); + QCOMPARE(spy_activate_panel1.count(), 2); + + // Deactivate the scene + QApplication::sendEvent(&scene, &deactivate); + QVERIFY(!panel1->isActive()); + QCOMPARE(spy_deactivate_panel1.count(), 2); + + // Reactivate the scene + QApplication::sendEvent(&scene, &activate); + QVERIFY(panel1->isActive()); + QCOMPARE(spy_activate_panel1.count(), 3); + + // Deactivate the scene + QApplication::sendEvent(&scene, &deactivate); + QVERIFY(!panel1->isActive()); + QVERIFY(!scene.activePanel()); + scene.setActivePanel(0); + + // Reactivate the scene + QApplication::sendEvent(&scene, &activate); + QVERIFY(!panel1->isActive()); +} + +void tst_QGraphicsItem::addPanelToActiveScene() +{ + QGraphicsScene scene; + QVERIFY(!scene.isActive()); + + QGraphicsRectItem *rect = new QGraphicsRectItem; + scene.addItem(rect); + QVERIFY(!rect->isActive()); + scene.removeItem(rect); + + QEvent activate(QEvent::WindowActivate); + QEvent deactivate(QEvent::WindowDeactivate); + + QApplication::sendEvent(&scene, &activate); + QVERIFY(scene.isActive()); + scene.addItem(rect); + QVERIFY(rect->isActive()); + scene.removeItem(rect); + + rect->setFlag(QGraphicsItem::ItemIsPanel); + scene.addItem(rect); + QVERIFY(rect->isActive()); + QCOMPARE(scene.activePanel(), (QGraphicsItem *)rect); + + QGraphicsRectItem *rect2 = new QGraphicsRectItem; + scene.addItem(rect2); + QVERIFY(rect->isActive()); + QCOMPARE(scene.activePanel(), (QGraphicsItem *)rect); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 3b6e8a7..afd8668 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -377,7 +377,7 @@ void tst_QGraphicsView::interactive() view.show(); QTestEventLoop::instance().enterLoop(1); - QCOMPARE(item->events.size(), 0); + QCOMPARE(item->events.size(), 1); // activate QPoint itemPoint = view.mapFromScene(item->scenePos()); @@ -385,16 +385,16 @@ void tst_QGraphicsView::interactive() for (int i = 0; i < 100; ++i) { sendMousePress(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), i * 5 + 2); + QCOMPARE(item->events.size(), i * 5 + 3); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GrabMouse); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::GraphicsSceneMousePress); sendMouseRelease(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), i * 5 + 4); + QCOMPARE(item->events.size(), i * 5 + 5); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GraphicsSceneMouseRelease); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::UngrabMouse); QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, itemPoint, view.mapToGlobal(itemPoint)); QApplication::sendEvent(view.viewport(), &contextEvent); - QCOMPARE(item->events.size(), i * 5 + 5); + QCOMPARE(item->events.size(), i * 5 + 6); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); } @@ -402,14 +402,14 @@ void tst_QGraphicsView::interactive() for (int i = 0; i < 100; ++i) { sendMousePress(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), 500); + QCOMPARE(item->events.size(), 501); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); sendMouseRelease(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), 500); + QCOMPARE(item->events.size(), 501); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); QContextMenuEvent contextEvent(QContextMenuEvent::Mouse, itemPoint, view.mapToGlobal(itemPoint)); QApplication::sendEvent(view.viewport(), &contextEvent); - QCOMPARE(item->events.size(), 500); + QCOMPARE(item->events.size(), 501); QCOMPARE(item->events.last(), QEvent::GraphicsSceneContextMenu); } } @@ -1873,32 +1873,32 @@ void tst_QGraphicsView::sendEvent() item->setFocus(); QCOMPARE(scene.focusItem(), (QGraphicsItem *)item); - QCOMPARE(item->events.size(), 1); + QCOMPARE(item->events.size(), 2); QCOMPARE(item->events.last(), QEvent::FocusIn); QPoint itemPoint = view.mapFromScene(item->scenePos()); sendMousePress(view.viewport(), itemPoint); - QCOMPARE(item->events.size(), 3); + QCOMPARE(item->events.size(), 4); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GrabMouse); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::GraphicsSceneMousePress); QMouseEvent mouseMoveEvent(QEvent::MouseMove, itemPoint, view.viewport()->mapToGlobal(itemPoint), Qt::LeftButton, Qt::LeftButton, 0); QApplication::sendEvent(view.viewport(), &mouseMoveEvent); - QCOMPARE(item->events.size(), 4); + QCOMPARE(item->events.size(), 5); QCOMPARE(item->events.last(), QEvent::GraphicsSceneMouseMove); QMouseEvent mouseReleaseEvent(QEvent::MouseButtonRelease, itemPoint, view.viewport()->mapToGlobal(itemPoint), Qt::LeftButton, 0, 0); QApplication::sendEvent(view.viewport(), &mouseReleaseEvent); - QCOMPARE(item->events.size(), 6); + QCOMPARE(item->events.size(), 7); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::GraphicsSceneMouseRelease); QCOMPARE(item->events.at(item->events.size() - 1), QEvent::UngrabMouse); QKeyEvent keyPress(QEvent::KeyPress, Qt::Key_Space, 0); QApplication::sendEvent(view.viewport(), &keyPress); - QCOMPARE(item->events.size(), 8); + QCOMPARE(item->events.size(), 9); QCOMPARE(item->events.at(item->events.size() - 2), QEvent::ShortcutOverride); QCOMPARE(item->events.last(), QEvent::KeyPress); } diff --git a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp index 04cfe1a..57fca9d 100644 --- a/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp +++ b/tests/auto/qpropertyanimation/tst_qpropertyanimation.cpp @@ -66,7 +66,7 @@ protected: class MyObject : public QObject { Q_OBJECT - Q_PROPERTY(qreal x READ x WRITE setX) + Q_PROPERTY(qreal x READ x WRITE setX) public: MyObject() : m_x(0) { } qreal x() const { return m_x; } @@ -115,6 +115,7 @@ private slots: void restart(); void valueChanged(); void twoAnimations(); + void deletedInUpdateCurrentTime(); }; tst_QPropertyAnimation::tst_QPropertyAnimation() @@ -142,7 +143,7 @@ class AnimationObject : public QObject Q_PROPERTY(qreal realValue READ realValue WRITE setRealValue) public: AnimationObject(int startValue = 0) - : v(startValue) + : v(startValue), rv(startValue) { } int value() const { return v; } @@ -402,7 +403,7 @@ void tst_QPropertyAnimation::duration0() animation.setStartValue(42); QVERIFY(animation.currentValue().isValid()); QCOMPARE(animation.currentValue().toInt(), 42); - + QCOMPARE(o.property("ole").toInt(), 42); animation.setDuration(0); QCOMPARE(animation.currentValue().toInt(), 43); //it is at the end @@ -1125,11 +1126,55 @@ void tst_QPropertyAnimation::twoAnimations() QCOMPARE(o1.ole(), 1000); QCOMPARE(o2.ole(), 1000); - } +class MyComposedAnimation : public QPropertyAnimation +{ + Q_OBJECT +public: + MyComposedAnimation(QObject *target, const QByteArray &propertyName, const QByteArray &innerPropertyName) + : QPropertyAnimation(target, propertyName) + { + innerAnim = new QPropertyAnimation(target, innerPropertyName); + this->setEndValue(1000); + innerAnim->setEndValue(1000); + innerAnim->setDuration(duration() + 100); + } + void start() + { + QPropertyAnimation::start(); + innerAnim->start(); + } + void updateState(QAbstractAnimation::State oldState, QAbstractAnimation::State newState) + { + QPropertyAnimation::updateState(oldState, newState); + if (newState == QAbstractAnimation::Stopped) + delete innerAnim; + } + +public: + QPropertyAnimation *innerAnim; +}; + +void tst_QPropertyAnimation::deletedInUpdateCurrentTime() +{ + // this test case reproduces an animation being deleted in the updateCurrentTime of + // another animation(was causing segfault). + // the deleted animation must have been started after the animation that is deleting. + AnimationObject o; + o.setValue(0); + o.setRealValue(0.0); + + MyComposedAnimation composedAnimation(&o, "value", "realValue"); + composedAnimation.start(); + QCOMPARE(composedAnimation.state(), QAbstractAnimation::Running); + QTest::qWait(composedAnimation.duration() + 50); + + QCOMPARE(composedAnimation.state(), QAbstractAnimation::Stopped); + QCOMPARE(o.value(), 1000); +} QTEST_MAIN(tst_QPropertyAnimation) #include "tst_qpropertyanimation.moc" |