diff options
Diffstat (limited to 'src/tools/uic/option.h')
-rw-r--r-- | src/tools/uic/option.h | 52 |
1 files changed, 20 insertions, 32 deletions
diff --git a/src/tools/uic/option.h b/src/tools/uic/option.h index c869fec9a6..cfdd90fda3 100644 --- a/src/tools/uic/option.h +++ b/src/tools/uic/option.h @@ -1,30 +1,5 @@ -/**************************************************************************** -** -** Copyright (C) 2016 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$ -** -****************************************************************************/ +// 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 OPTION_H #define OPTION_H @@ -36,6 +11,12 @@ QT_BEGIN_NAMESPACE struct Option { + enum class PythonResourceImport { + Default, // "import rc_file" + FromDot, // "from . import rc_file" + Absolute // "import path.rc_file" + }; + unsigned int headerProtection : 1; unsigned int copyrightHeader : 1; unsigned int generateImplemetation : 1; @@ -45,9 +26,11 @@ struct Option unsigned int limitXPM_LineLength : 1; unsigned int implicitIncludes: 1; unsigned int idBased: 1; - unsigned int fromImports: 1; unsigned int forceMemberFnPtrConnectionSyntax: 1; unsigned int forceStringConnectionSyntax: 1; + unsigned int useStarImports: 1; + unsigned int rcPrefix: 1; // Python: Generate "rc_file" instead of "file_rc" import + unsigned int qtNamespace: 1; QString inputFile; QString outputFile; @@ -57,6 +40,9 @@ struct Option QString postfix; QString translateFunction; QString includeFile; + QString pythonRoot; + + PythonResourceImport pythonResourceImport = PythonResourceImport::Default; Option() : headerProtection(1), @@ -68,16 +54,18 @@ struct Option limitXPM_LineLength(0), implicitIncludes(1), idBased(0), - fromImports(0), forceMemberFnPtrConnectionSyntax(0), forceStringConnectionSyntax(0), - prefix(QLatin1String("Ui_")) - { indent.fill(QLatin1Char(' '), 4); } + useStarImports(0), + rcPrefix(0), + qtNamespace(1), + prefix(QLatin1StringView("Ui_")) + { indent.fill(u' ', 4); } QString messagePrefix() const { return inputFile.isEmpty() ? - QString(QLatin1String("stdin")) : + QString(QLatin1StringView("stdin")) : QDir::toNativeSeparators(inputFile); } }; |