diff options
Diffstat (limited to 'src/shared/qtpropertybrowser/qtpropertybrowser.h')
-rw-r--r-- | src/shared/qtpropertybrowser/qtpropertybrowser.h | 67 |
1 files changed, 11 insertions, 56 deletions
diff --git a/src/shared/qtpropertybrowser/qtpropertybrowser.h b/src/shared/qtpropertybrowser/qtpropertybrowser.h index 697ee4c7d..623ea5d67 100644 --- a/src/shared/qtpropertybrowser/qtpropertybrowser.h +++ b/src/shared/qtpropertybrowser/qtpropertybrowser.h @@ -1,41 +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:LGPL$ -** 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 Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 3 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL3 included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 3 requirements -** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 2.0 or (at your option) the GNU General -** Public license version 3 or any later version approved by the KDE Free -** Qt Foundation. The licenses are as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 -** 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-2.0.html and -** 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 LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only #ifndef QTPROPERTYBROWSER_H #define QTPROPERTYBROWSER_H @@ -105,9 +69,7 @@ public: QtProperty *addProperty(const QString &name = QString()); Q_SIGNALS: - - void propertyInserted(QtProperty *property, - QtProperty *parent, QtProperty *after); + void propertyInserted(QtProperty *property, QtProperty *parent, QtProperty *after); void propertyChanged(QtProperty *property); void propertyRemoved(QtProperty *property, QtProperty *parent); void propertyDestroyed(QtProperty *property); @@ -148,7 +110,7 @@ public: explicit QtAbstractEditorFactory(QObject *parent) : QtAbstractEditorFactoryBase(parent) {} QWidget *createEditor(QtProperty *property, QWidget *parent) override { - for (PropertyManager *manager : qAsConst(m_managers)) { + for (PropertyManager *manager : std::as_const(m_managers)) { if (manager == property->propertyManager()) { return createEditor(manager, property, parent); } @@ -161,15 +123,15 @@ public: return; m_managers.insert(manager); connectPropertyManager(manager); - connect(manager, SIGNAL(destroyed(QObject *)), - this, SLOT(managerDestroyed(QObject *))); + connect(manager, &QObject::destroyed, + this, &QtAbstractEditorFactory<PropertyManager>::managerDestroyed); } void removePropertyManager(PropertyManager *manager) { if (!m_managers.contains(manager)) return; - disconnect(manager, SIGNAL(destroyed(QObject *)), - this, SLOT(managerDestroyed(QObject *))); + disconnect(manager, &QObject::destroyed, + this, &QtAbstractEditorFactory<PropertyManager>::managerDestroyed); disconnectPropertyManager(manager); m_managers.remove(manager); } @@ -180,7 +142,7 @@ public: PropertyManager *propertyManager(QtProperty *property) const { QtAbstractPropertyManager *manager = property->propertyManager(); - for (PropertyManager *m : qAsConst(m_managers)) { + for (PropertyManager *m : std::as_const(m_managers)) { if (m == manager) { return m; } @@ -194,7 +156,7 @@ protected: virtual void disconnectPropertyManager(PropertyManager *manager) = 0; void managerDestroyed(QObject *manager) override { - for (PropertyManager *m : qAsConst(m_managers)) { + for (PropertyManager *m : std::as_const(m_managers)) { if (m == manager) { m_managers.remove(m); return; @@ -204,7 +166,7 @@ protected: private: void breakConnection(QtAbstractPropertyManager *manager) override { - for (PropertyManager *m : qAsConst(m_managers)) { + for (PropertyManager *m : std::as_const(m_managers)) { if (m == manager) { removePropertyManager(m); return; @@ -289,13 +251,6 @@ private: QScopedPointer<QtAbstractPropertyBrowserPrivate> d_ptr; Q_DECLARE_PRIVATE(QtAbstractPropertyBrowser) Q_DISABLE_COPY_MOVE(QtAbstractPropertyBrowser) - Q_PRIVATE_SLOT(d_func(), void slotPropertyInserted(QtProperty *, - QtProperty *, QtProperty *)) - Q_PRIVATE_SLOT(d_func(), void slotPropertyRemoved(QtProperty *, - QtProperty *)) - Q_PRIVATE_SLOT(d_func(), void slotPropertyDestroyed(QtProperty *)) - Q_PRIVATE_SLOT(d_func(), void slotPropertyDataChanged(QtProperty *)) - }; QT_END_NAMESPACE |