diff options
author | Lucie Gérard <lucie.gerard@qt.io> | 2021-07-16 11:07:52 +0200 |
---|---|---|
committer | Lucie Gérard <lucie.gerard@qt.io> | 2021-08-09 12:07:21 +0200 |
commit | 05373779677add98059d566c2365412fae15b939 (patch) | |
tree | 22a53a11d6983e02a7258c82e4ffa48334d2bc69 /tests/auto/linguist | |
parent | 653f3ee5eb9527bee38eb5efffef0adfebb71b4a (diff) | |
download | qttools-05373779677add98059d566c2365412fae15b939.tar.gz |
lupdate/clang: Add test for alias function
Make sure a file containing only alias functions
is not skipped.
Change-Id: I69a4d7164e4f2e14cb8fcc43e119c6968096b144
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/linguist')
4 files changed, 45 insertions, 0 deletions
diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/lupdatecmd b/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/lupdatecmd new file mode 100644 index 000000000..e8aa3b3d0 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/lupdatecmd @@ -0,0 +1 @@ +lupdate project.pro -tr-function-alias QT_TRANSLATE_NOOP+=ma_fonction_a_moi diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/project.pro b/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/project.pro index 2aeddf642..86959e1a9 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/project.pro +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/project.pro @@ -2,5 +2,6 @@ SOURCES += test_QT_TR_NOOP_context.cpp SOURCES += test_QT_TR_NOOP_context_bis.cpp SOURCES += test_isolatedComments.cpp SOURCES += test_sameLineComments.cpp +SOURCES += test_contain_only_alias.cpp TRANSLATIONS = project.ts diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/project.ts.result b/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/project.ts.result index d4ebe1837..826662dd5 100644 --- a/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/project.ts.result +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/project.ts.result @@ -269,4 +269,12 @@ <translation type="unfinished"></translation> </message> </context> +<context> + <name>zscope</name> + <message> + <location filename="test_contain_only_alias.cpp" line="33"/> + <source>string_a_moi</source> + <translation type="unfinished"></translation> + </message> +</context> </TS> diff --git a/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/test_contain_only_alias.cpp b/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/test_contain_only_alias.cpp new file mode 100644 index 000000000..eb42f18c7 --- /dev/null +++ b/tests/auto/linguist/lupdate/testdata/good/parsecpp_clang_only/test_contain_only_alias.cpp @@ -0,0 +1,35 @@ +/**************************************************************************** +** +** Copyright (C) 2021 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the tools applications 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$ +** +****************************************************************************/ + +#ifndef MYOBJECT_H +#define MYOBJECT_H + +#include <QtCore> +const char *c_2 = ma_fonction_a_moi("zscope", "string_a_moi"); + +#endif |