summaryrefslogtreecommitdiffstats
path: root/tests/auto/linguist/lupdate/testdata/good/parsecpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/linguist/lupdate/testdata/good/parsecpp')
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/excluded.cpp54
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/finddialog.cpp54
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/included.cpp54
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp94
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/notincluded.cpp54
-rw-r--r--tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result38
6 files changed, 213 insertions, 135 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/excluded.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/excluded.cpp
index 592ceb4d8..32d0210a6 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/excluded.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/excluded.cpp
@@ -1,30 +1,30 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
int main(int argc, char **argv)
{
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/finddialog.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/finddialog.cpp
index ec9d1e5a9..65d5ede30 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/finddialog.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/finddialog.cpp
@@ -1,30 +1,30 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the autotests of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
//#include "finddialog.h" nothing is picked up from there
//#include "mainwindow.h"
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/included.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/included.cpp
index 88b820ae7..ff7fe370b 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/included.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/included.cpp
@@ -1,30 +1,30 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#include <QtCore>
class MyClass2{
QString toto = QObject::tr("message from #included .cpp file");
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
index 6d2dde8c8..49f30a8e3 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/main.cpp
@@ -1,30 +1,30 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
// 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!!!
@@ -688,3 +688,43 @@ void testing::test() { static const char * const test_string_n3[] = {
QT_TR_N_NOOP("%n test")
};
}
+
+
+
+// QTBUG-91521: context in static initializers with parentheses
+class Hogus : QObject {
+ Q_OBJECT
+ static const QString myString;
+};
+
+const QString Hogus::myString(QT_TR_NOOP("this should be in Hogus"));
+
+
+
+// QTBUG-99415: multiple specifiers after method parameter list
+class QTBUG99415 : QObject {
+ Q_OBJECT
+ const QString text1() const noexcept { return tr("text1"); }
+ const QString text2() const noexcept;
+};
+
+const QString QTBUG99415::text2() const noexcept { return tr("text2"); }
+
+// QTBUG-110630: Support quoting in extras field to allow whitespace preservation
+class QTBUG110630 : QObject {
+ Q_OBJECT
+ const QString txt() {
+ //~ quoted " string with spaces "
+ tr("translation with extras-quoted field");
+ }
+};
+
+// enum class - C++11
+enum class Bar : unsigned short;
+// QTBUG-36589: Don't treat enum classes as a normal class
+class QTBUG36589 : QObject {
+ Q_OBJECT
+ const QString txt() {
+ tr("string after an enum class");
+ }
+};
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp/notincluded.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp/notincluded.cpp
index 2e1fe3105..3f502fffe 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/notincluded.cpp
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/notincluded.cpp
@@ -1,30 +1,30 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL-EXCEPT$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 as published by the Free Software
-** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#include <QtCore>
class MyClass{
QString toto = QObject::tr("message from #included .cpp file");
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 631d5cefd..fe5c00d96 100644
--- a/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
+++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp/project.ts.result
@@ -166,6 +166,14 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>Hogus</name>
+ <message>
+ <location filename="main.cpp" line="700"/>
+ <source>this should be in Hogus</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>Internal::Message</name>
<message>
<location filename="main.cpp" line="283"/>
@@ -414,6 +422,36 @@ backslashed \ stuff.</source>
</message>
</context>
<context>
+ <name>QTBUG110630</name>
+ <message>
+ <location filename="main.cpp" line="718"/>
+ <source>translation with extras-quoted field</source>
+ <translation type="unfinished"></translation>
+ <extra-quoted> string with spaces </extra-quoted>
+ </message>
+</context>
+<context>
+ <name>QTBUG36589</name>
+ <message>
+ <location filename="main.cpp" line="728"/>
+ <source>string after an enum class</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>QTBUG99415</name>
+ <message>
+ <location filename="main.cpp" line="707"/>
+ <source>text1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <location filename="main.cpp" line="711"/>
+ <source>text2</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
<name>QTranslator</name>
<message>
<location filename="finddialog.cpp" line="168"/>