summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-14 16:46:31 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-17 13:47:53 +0100
commit93af98f72a9f7bbca6013382349c0a2e7f1ab1a7 (patch)
treec1edd04d30e2a5b22b560855d19b69c18f449df2
parent3efb0d50e590f6a1e8d67d0136a648cd3b97c37d (diff)
Widgets: Remove obsolete QGuiPlatformPlugin.
It has been superseeded by QPlatformTheme. Task-number: QTBUG-24204 Change-Id: I8c4131c7bfd8201e747984d772ed8042610192b8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
-rw-r--r--src/widgets/itemviews/qfileiconprovider.cpp5
-rw-r--r--src/widgets/kernel/kernel.pri2
-rw-r--r--src/widgets/kernel/qapplication.cpp6
-rw-r--r--src/widgets/kernel/qguiplatformplugin.cpp134
-rw-r--r--src/widgets/kernel/qguiplatformplugin_p.h101
5 files changed, 0 insertions, 248 deletions
diff --git a/src/widgets/itemviews/qfileiconprovider.cpp b/src/widgets/itemviews/qfileiconprovider.cpp
index e90f78c801..b6669c0784 100644
--- a/src/widgets/itemviews/qfileiconprovider.cpp
+++ b/src/widgets/itemviews/qfileiconprovider.cpp
@@ -47,7 +47,6 @@
#include <qdir.h>
#include <qpixmapcache.h>
#include <private/qfunctions_p.h>
-#include <private/qguiplatformplugin_p.h>
#if defined(Q_OS_WIN)
# define _WIN32_IE 0x0500
@@ -399,10 +398,6 @@ QIcon QFileIconProvider::icon(const QFileInfo &info) const
{
Q_D(const QFileIconProvider);
- QIcon platformIcon = qt_guiPlatformPlugin()->fileSystemIcon(info);
- if (!platformIcon.isNull())
- return platformIcon;
-
#if defined(Q_WS_X11) && !defined(QT_NO_STYLE_GTK)
if (X11->desktopEnvironment == DE_GNOME) {
QIcon gtkIcon = QGtkStylePrivate::getFilesystemIcon(info);
diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri
index 80f165063c..97430babd3 100644
--- a/src/widgets/kernel/kernel.pri
+++ b/src/widgets/kernel/kernel.pri
@@ -40,7 +40,6 @@ HEADERS += \
kernel/qgesturemanager_p.h \
kernel/qsoftkeymanager_p.h \
kernel/qsoftkeymanager_common_p.h \
- kernel/qguiplatformplugin_p.h \
kernel/qdesktopwidget_qpa_p.h \
kernel/qwidgetwindow_qpa_p.h \
kernel/qplatformmenu_qpa.h
@@ -72,7 +71,6 @@ SOURCES += \
kernel/qgesturemanager.cpp \
kernel/qsoftkeymanager.cpp \
kernel/qdesktopwidget.cpp \
- kernel/qguiplatformplugin.cpp \
kernel/qwidgetsvariant.cpp \
kernel/qapplication_qpa.cpp \
kernel/qdesktopwidget_qpa.cpp \
diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp
index ae4f5e01b7..f7153a0f32 100644
--- a/src/widgets/kernel/qapplication.cpp
+++ b/src/widgets/kernel/qapplication.cpp
@@ -80,8 +80,6 @@
#include <private/qt_x11_p.h>
#endif
-#include "qguiplatformplugin_p.h"
-
#include <qthread.h>
#include <private/qthread_p.h>
@@ -758,10 +756,6 @@ void QApplicationPrivate::construct(
qCritical("Library qttestability load failed!");
}
}
-
- //make sure the plugin is loaded
- if (qt_is_gui_used)
- qt_guiPlatformPlugin();
#endif
}
diff --git a/src/widgets/kernel/qguiplatformplugin.cpp b/src/widgets/kernel/qguiplatformplugin.cpp
deleted file mode 100644
index f5c8399a0b..0000000000
--- a/src/widgets/kernel/qguiplatformplugin.cpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qguiplatformplugin_p.h"
-#include <qdebug.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qsettings.h>
-#include "private/qfactoryloader_p.h"
-#include "qstylefactory.h"
-#include "qapplication.h"
-#include "qplatformdefs.h"
-#include "qicon.h"
-
-#ifdef Q_OS_WINCE
-extern bool qt_wince_is_smartphone(); //qguifunctions_wince.cpp
-extern bool qt_wince_is_mobile(); //qguifunctions_wince.cpp
-extern bool qt_wince_is_pocket_pc(); //qguifunctions_wince.cpp
-#endif
-
-
-#if defined(Q_WS_X11)
-#include <private/qkde_p.h>
-#include <private/qgtkstyle_p.h>
-#include <private/qt_x11_p.h>
-#endif
-
-
-QT_BEGIN_NAMESPACE
-
-
-/*! \internal
- Return (an construct if necesseray) the Gui Platform plugin.
-
- The plugin key to be loaded is inside the QT_PLATFORM_PLUGIN environment variable.
- If it is not set, it will be the DESKTOP_SESSION on X11.
-
- If no plugin can be loaded, the default one is returned.
- */
-QGuiPlatformPlugin *qt_guiPlatformPlugin()
-{
- static QGuiPlatformPlugin *plugin;
- if (!plugin)
- {
-#ifndef QT_NO_LIBRARY
-
- QString key = QString::fromLocal8Bit(qgetenv("QT_PLATFORM_PLUGIN"));
-#ifdef Q_WS_X11
- if (key.isEmpty()) {
- switch(X11->desktopEnvironment) {
- case DE_KDE:
- key = QString::fromLatin1("kde");
- break;
- default:
- key = QString::fromLocal8Bit(qgetenv("DESKTOP_SESSION"));
- break;
- }
- }
-#endif
-
- if (!key.isEmpty() && QApplication::desktopSettingsAware()) {
- QFactoryLoader loader(QGuiPlatformPluginInterface_iid, QLatin1String("/gui_platform"));
- plugin = qobject_cast<QGuiPlatformPlugin *>(loader.instance(key));
- }
-#endif // QT_NO_LIBRARY
-
- if(!plugin) {
- static QGuiPlatformPlugin def;
- plugin = &def;
- }
- }
- return plugin;
-}
-
-
-/* \class QPlatformPlugin
- QGuiPlatformPlugin can be used to integrate Qt applications in a platform built on top of Qt.
- The application developer should not know or use the plugin, it is only used by Qt internaly.
-
- But full platforms that are built on top of Qt may provide a plugin so 3rd party Qt applications
- running on the platform are integrated.
- */
-
-/*
- The constructor can be used to install hooks in Qt
- */
-QGuiPlatformPlugin::QGuiPlatformPlugin(QObject *parent) : QObject(parent) {}
-QGuiPlatformPlugin::~QGuiPlatformPlugin() {}
-
-/* backend for QFileIconProvider, null icon means default */
-QIcon QGuiPlatformPlugin::fileSystemIcon(const QFileInfo &)
-{
- return QIcon();
-}
-
-QT_END_NAMESPACE
diff --git a/src/widgets/kernel/qguiplatformplugin_p.h b/src/widgets/kernel/qguiplatformplugin_p.h
deleted file mode 100644
index c42db3bb92..0000000000
--- a/src/widgets/kernel/qguiplatformplugin_p.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the QtGui module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 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 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QGUIPLATFORM_P_H
-#define QGUIPLATFORM_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 <QtCore/qplugin.h>
-#include <QtCore/qfactoryinterface.h>
-#include <QtWidgets/qdialog.h>
-
-QT_BEGIN_HEADER
-
-QT_BEGIN_NAMESPACE
-
-
-class QStyle;
-class QPalette;
-class QIcon;
-class QFileDialog;
-class QColorDialog;
-class QFileInfo;
-
-struct Q_WIDGETS_EXPORT QGuiPlatformPluginInterface : public QFactoryInterface
-{
-};
-
-#define QGuiPlatformPluginInterface_iid "com.nokia.qt.QGuiPlatformPluginInterface"
-
-Q_DECLARE_INTERFACE(QGuiPlatformPluginInterface, QGuiPlatformPluginInterface_iid)
-
-class Q_WIDGETS_EXPORT QGuiPlatformPlugin : public QObject, public QGuiPlatformPluginInterface
-{
- Q_OBJECT
- Q_INTERFACES(QGuiPlatformPluginInterface:QFactoryInterface)
- public:
- explicit QGuiPlatformPlugin(QObject *parent = 0);
- ~QGuiPlatformPlugin();
-
- virtual QStringList keys() const { return QStringList(QStringLiteral("default")); }
-
- virtual QIcon fileSystemIcon(const QFileInfo &);
-};
-
-//internal
-QGuiPlatformPlugin *qt_guiPlatformPlugin();
-
-QT_END_NAMESPACE
-
-QT_END_HEADER
-
-
-#endif // QGUIPLATFORMPLUGIN_H