diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2018-03-14 13:20:45 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2018-03-14 14:44:42 +0000 |
commit | 12030ce62ef8fa0451679d19fc419ee0fa02bb6a (patch) | |
tree | 0fe7f2b4cb40a4fc52751b6b3e700b4e6ba51106 /src | |
parent | eca60c6f6932231e9f9f497d474d49f8192948ec (diff) |
Remove unused QQuickProxyTheme
QQuickTheme has been de-coupled from QPlatformTheme. The proxy theme is
no longer needed at all.
Change-Id: I6a97f5d83a86b77384d4dd41f9777bd022892eb3
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quicktemplates2/qquickproxytheme.cpp | 170 | ||||
-rw-r--r-- | src/quicktemplates2/qquickproxytheme_p.h | 99 | ||||
-rw-r--r-- | src/quicktemplates2/quicktemplates2.pri | 2 |
3 files changed, 0 insertions, 271 deletions
diff --git a/src/quicktemplates2/qquickproxytheme.cpp b/src/quicktemplates2/qquickproxytheme.cpp deleted file mode 100644 index f6e8f773..00000000 --- a/src/quicktemplates2/qquickproxytheme.cpp +++ /dev/null @@ -1,170 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Templates 2 module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** 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 http://www.qt.io/terms-conditions. For further -** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qquickproxytheme_p.h" - -#include <QtGui/private/qguiapplication_p.h> -#include <QtGui/qpixmap.h> -#include <QtGui/qfont.h> - -QT_BEGIN_NAMESPACE - -QQuickProxyTheme::QQuickProxyTheme(QPlatformTheme *theme) - : m_theme(theme ? theme : QGuiApplicationPrivate::platform_theme) -{ -} - -QQuickProxyTheme::~QQuickProxyTheme() -{ - if (QGuiApplicationPrivate::platform_theme == this) - QGuiApplicationPrivate::platform_theme = m_theme; -} - -QPlatformTheme *QQuickProxyTheme::theme() const -{ - return m_theme; -} - -QPlatformMenuItem *QQuickProxyTheme::createPlatformMenuItem() const -{ - if (m_theme) - return m_theme->createPlatformMenuItem(); - return QPlatformTheme::createPlatformMenuItem(); -} - -QPlatformMenu *QQuickProxyTheme::createPlatformMenu() const -{ - if (m_theme) - return m_theme->createPlatformMenu(); - return QPlatformTheme::createPlatformMenu(); -} - -QPlatformMenuBar *QQuickProxyTheme::createPlatformMenuBar() const -{ - if (m_theme) - return m_theme->createPlatformMenuBar(); - return QPlatformTheme::createPlatformMenuBar(); -} - -void QQuickProxyTheme::showPlatformMenuBar() -{ - if (m_theme) - m_theme->showPlatformMenuBar(); - QPlatformTheme::showPlatformMenuBar(); -} - -bool QQuickProxyTheme::usePlatformNativeDialog(QPlatformTheme::DialogType type) const -{ - if (m_theme) - return m_theme->usePlatformNativeDialog(type); - return QPlatformTheme::usePlatformNativeDialog(type); -} - -QPlatformDialogHelper *QQuickProxyTheme::createPlatformDialogHelper(QPlatformTheme::DialogType type) const -{ - if (m_theme) - return m_theme->createPlatformDialogHelper(type); - return QPlatformTheme::createPlatformDialogHelper(type); -} - -#ifndef QT_NO_SYSTEMTRAYICON -QPlatformSystemTrayIcon *QQuickProxyTheme::createPlatformSystemTrayIcon() const -{ - if (m_theme) - return m_theme->createPlatformSystemTrayIcon(); - return QPlatformTheme::createPlatformSystemTrayIcon(); -} -#endif - -const QPalette *QQuickProxyTheme::palette(QPlatformTheme::Palette type) const -{ - if (m_theme) - return m_theme->palette(type); - return QPlatformTheme::palette(type); -} - -const QFont *QQuickProxyTheme::font(QPlatformTheme::Font type) const -{ - if (m_theme) - return m_theme->font(type); - return QPlatformTheme::font(type); -} - -QVariant QQuickProxyTheme::themeHint(QPlatformTheme::ThemeHint hint) const -{ - if (m_theme) - return m_theme->themeHint(hint); - return QPlatformTheme::themeHint(hint); -} - -QPixmap QQuickProxyTheme::standardPixmap(QPlatformTheme::StandardPixmap sp, const QSizeF &size) const -{ - if (m_theme) - return m_theme->standardPixmap(sp, size); - return QPlatformTheme::standardPixmap(sp, size); -} - -QIcon QQuickProxyTheme::fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions) const -{ - if (m_theme) - return m_theme->fileIcon(fileInfo, iconOptions); - return QPlatformTheme::fileIcon(fileInfo, iconOptions); -} - -QIconEngine *QQuickProxyTheme::createIconEngine(const QString &iconName) const -{ - if (m_theme) - return m_theme->createIconEngine(iconName); - return QPlatformTheme::createIconEngine(iconName); -} - -#if QT_CONFIG(shortcut) -QList<QKeySequence> QQuickProxyTheme::keyBindings(QKeySequence::StandardKey key) const -{ - if (m_theme) - return m_theme->keyBindings(key); - return QPlatformTheme::keyBindings(key); -} -#endif - -QString QQuickProxyTheme::standardButtonText(int button) const -{ - if (m_theme) - return m_theme->standardButtonText(button); - return QPlatformTheme::standardButtonText(button); -} - -QT_END_NAMESPACE diff --git a/src/quicktemplates2/qquickproxytheme_p.h b/src/quicktemplates2/qquickproxytheme_p.h deleted file mode 100644 index f580f6c5..00000000 --- a/src/quicktemplates2/qquickproxytheme_p.h +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2017 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the Qt Quick Templates 2 module of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:LGPL3$ -** 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 http://www.qt.io/terms-conditions. For further -** information use the contact form at http://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.LGPLv3 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.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 later as published by the Free -** Software Foundation and appearing in the file LICENSE.GPL included in -** the packaging of this file. Please review the following information to -** ensure the GNU General Public License version 2.0 requirements will be -** met: http://www.gnu.org/licenses/gpl-2.0.html. -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QQUICKPROXYTHEME_P_H -#define QQUICKPROXYTHEME_P_H - -// -// W A R N I N G -// ------------- -// -// This file is not part of the Qt API. It exists purely as an -// implementation detail. This header file may change from version to -// version without notice, or even be removed. -// -// We mean it. -// - -#include <QtGui/qpa/qplatformtheme.h> -#include <QtQuickTemplates2/private/qtquicktemplates2global_p.h> - -QT_BEGIN_NAMESPACE - -class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickProxyTheme : public QPlatformTheme -{ -public: - explicit QQuickProxyTheme(QPlatformTheme *theme = nullptr); - ~QQuickProxyTheme(); - - QPlatformTheme* theme() const; - - QPlatformMenuItem* createPlatformMenuItem() const override; - QPlatformMenu* createPlatformMenu() const override; - QPlatformMenuBar* createPlatformMenuBar() const override; - void showPlatformMenuBar() override; - - bool usePlatformNativeDialog(DialogType type) const override; - QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const override; - -#ifndef QT_NO_SYSTEMTRAYICON - QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const override; -#endif - - const QPalette *palette(Palette type = SystemPalette) const override; - - const QFont *font(Font type = SystemFont) const override; - - QVariant themeHint(ThemeHint hint) const override; - - QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override; - QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions iconOptions = 0) const override; - - QIconEngine *createIconEngine(const QString &iconName) const override; - -#if QT_CONFIG(shortcut) - QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const override; -#endif - - QString standardButtonText(int button) const override; - -private: - QPlatformTheme *m_theme; -}; - -QT_END_NAMESPACE - -#endif // QQUICKPROXYTHEME_P_H diff --git a/src/quicktemplates2/quicktemplates2.pri b/src/quicktemplates2/quicktemplates2.pri index c9ccc420..c37526d4 100644 --- a/src/quicktemplates2/quicktemplates2.pri +++ b/src/quicktemplates2/quicktemplates2.pri @@ -59,7 +59,6 @@ HEADERS += \ $$PWD/qquickpopuppositioner_p_p.h \ $$PWD/qquickpresshandler_p_p.h \ $$PWD/qquickprogressbar_p.h \ - $$PWD/qquickproxytheme_p.h \ $$PWD/qquickradiobutton_p.h \ $$PWD/qquickradiodelegate_p.h \ $$PWD/qquickrangeslider_p.h \ @@ -136,7 +135,6 @@ SOURCES += \ $$PWD/qquickpopuppositioner.cpp \ $$PWD/qquickpresshandler.cpp \ $$PWD/qquickprogressbar.cpp \ - $$PWD/qquickproxytheme.cpp \ $$PWD/qquickradiobutton.cpp \ $$PWD/qquickradiodelegate.cpp \ $$PWD/qquickrangeslider.cpp \ |