diff options
Diffstat (limited to 'src/linguist/lupdate/lupdate.h')
-rw-r--r-- | src/linguist/lupdate/lupdate.h | 42 |
1 files changed, 9 insertions, 33 deletions
diff --git a/src/linguist/lupdate/lupdate.h b/src/linguist/lupdate/lupdate.h index 44336d9f5..5cc0f8c2b 100644 --- a/src/linguist/lupdate/lupdate.h +++ b/src/linguist/lupdate/lupdate.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Linguist 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 WITH Qt-GPL-exception-1.0 #ifndef LUPDATE_H #define LUPDATE_H @@ -52,7 +27,6 @@ enum UpdateOption { NoSort = 8, HeuristicSameText = 16, HeuristicSimilarText = 32, - HeuristicNumber = 64, AbsoluteLocations = 256, RelativeLocations = 512, NoLocations = 1024, @@ -69,6 +43,7 @@ Translator merge( void loadCPP(Translator &translator, const QStringList &filenames, ConversionData &cd); bool loadJava(Translator &translator, const QString &filename, ConversionData &cd); +bool loadPython(Translator &translator, const QString &fileName, ConversionData &cd); bool loadUI(Translator &translator, const QString &filename, ConversionData &cd); #ifndef QT_NO_QML @@ -120,6 +95,8 @@ public: NumTrFunctions }; + using NameToTrFunctionMap = QHash<QString, TrFunction>; + enum Operation { AddAlias, SetAlias }; int trFunctionByName(const QString &trFunctionName) const; @@ -130,17 +107,16 @@ public: { return m_trFunctionAliases[trFunction].contains(identifier); } QStringList availableFunctionsWithAliases() const; + QStringList listAliases() const; + + const NameToTrFunctionMap &nameToTrFunctionMap() const; private: void ensureTrFunctionHashUpdated() const; private: QStringList m_trFunctionAliases[NumTrFunctions]; - mutable QHash<QString,TrFunction> m_nameToTrFunctionMap; -}; - -class LU { - Q_DECLARE_TR_FUNCTIONS(LUpdate) + mutable NameToTrFunctionMap m_nameToTrFunctionMap; }; QT_END_NAMESPACE |