diff options
Diffstat (limited to 'src/designer/src/lib/shared/qdesigner_introspection.cpp')
-rw-r--r-- | src/designer/src/lib/shared/qdesigner_introspection.cpp | 38 |
1 files changed, 8 insertions, 30 deletions
diff --git a/src/designer/src/lib/shared/qdesigner_introspection.cpp b/src/designer/src/lib/shared/qdesigner_introspection.cpp index 89dc6350e..60a4272d7 100644 --- a/src/designer/src/lib/shared/qdesigner_introspection.cpp +++ b/src/designer/src/lib/shared/qdesigner_introspection.cpp @@ -1,39 +1,17 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Designer 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 #include "qdesigner_introspection_p.h" +#include <QtCore/qobject.h> #include <QtCore/qlist.h> #include <QtCore/qmetaobject.h> #include <QtCore/qstringlist.h> QT_BEGIN_NAMESPACE +using namespace Qt::StringLiterals; + // Qt Implementation static QStringList byteArrayListToStringList(const QByteArrayList &l) { @@ -63,6 +41,7 @@ namespace { int keyToValue(const QString &key) const override { return m_enum.keyToValue(key.toUtf8()); } int keysToValue(const QString &keys) const override { return m_enum.keysToValue(keys.toUtf8()); } QString name() const override { return m_name; } + QString enumName() const override { return charToQString(m_enum.enumName()); } QString scope() const override { return m_scope; } QString separator() const override; int value(int index) const override { return m_enum.value(index); } @@ -84,8 +63,7 @@ namespace { QString QDesignerMetaEnum::separator() const { - static const QString rc = QStringLiteral("::"); - return rc; + return u"::"_s; } // ------- QDesignerMetaProperty @@ -343,7 +321,7 @@ namespace qdesigner_internal { const QDesignerMetaObjectInterface* QDesignerIntrospection::metaObjectForQMetaObject(const QMetaObject *metaObject) const { - MetaObjectMap::iterator it = m_metaObjectMap.find(metaObject); + auto it = m_metaObjectMap.find(metaObject); if (it == m_metaObjectMap.end()) it = m_metaObjectMap.insert(metaObject, new QDesignerMetaObject(this, metaObject)); return it.value(); |