summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@nokia.com>2012-05-27 04:57:31 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-08 00:12:09 +0200
commit0b69385e420d55995c73f8f490f02f4565088a23 (patch)
tree95b122557a506ea707471bd9a145b4db90c9ff2d
parentd173da37eedf8229518da7998249c47f364566b4 (diff)
Remove the QFactoryInterface dependency from platform plugins
Change-Id: I4010e59dcd8a790e06bb9a0ccf3cc9a5c7737ed1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/gui/kernel/qplatformintegrationfactory_qpa.cpp4
-rw-r--r--src/gui/kernel/qplatformintegrationplugin.h11
-rw-r--r--src/gui/kernel/qplatformthemefactory_qpa.cpp4
-rw-r--r--src/gui/kernel/qplatformthemeplugin.h12
-rw-r--r--src/plugins/platforms/cocoa/main.mm8
-rw-r--r--src/plugins/platforms/directfb/main.cpp9
-rw-r--r--src/plugins/platforms/eglfs/main.cpp8
-rw-r--r--src/plugins/platforms/kms/main.cpp8
-rw-r--r--src/plugins/platforms/linuxfb/main.cpp8
-rw-r--r--src/plugins/platforms/minimal/main.cpp8
-rw-r--r--src/plugins/platforms/openwfd/main.cpp8
-rw-r--r--src/plugins/platforms/qnx/main.cpp7
-rw-r--r--src/plugins/platforms/qnx/main.h1
-rw-r--r--src/plugins/platforms/windows/main.cpp6
-rw-r--r--src/plugins/platforms/xcb/main.cpp8
15 files changed, 6 insertions, 104 deletions
diff --git a/src/gui/kernel/qplatformintegrationfactory_qpa.cpp b/src/gui/kernel/qplatformintegrationfactory_qpa.cpp
index 3b05742f09..886f50bdc6 100644
--- a/src/gui/kernel/qplatformintegrationfactory_qpa.cpp
+++ b/src/gui/kernel/qplatformintegrationfactory_qpa.cpp
@@ -66,10 +66,10 @@ QPlatformIntegration *QPlatformIntegrationFactory::create(const QString& key, co
// Try loading the plugin from platformPluginPath first:
if (!platformPluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(platformPluginPath);
- if (QPlatformIntegration *ret = qLoadPlugin1<QPlatformIntegration, QPlatformIntegrationFactoryInterface >(directLoader(), platform, paramList))
+ if (QPlatformIntegration *ret = qLoadPlugin1<QPlatformIntegration, QPlatformIntegrationPlugin>(directLoader(), platform, paramList))
return ret;
}
- if (QPlatformIntegration *ret = qLoadPlugin1<QPlatformIntegration, QPlatformIntegrationFactoryInterface >(loader(), platform, paramList))
+ if (QPlatformIntegration *ret = qLoadPlugin1<QPlatformIntegration, QPlatformIntegrationPlugin>(loader(), platform, paramList))
return ret;
#endif
return 0;
diff --git a/src/gui/kernel/qplatformintegrationplugin.h b/src/gui/kernel/qplatformintegrationplugin.h
index 8b36a7dee2..8990668c60 100644
--- a/src/gui/kernel/qplatformintegrationplugin.h
+++ b/src/gui/kernel/qplatformintegrationplugin.h
@@ -61,24 +61,15 @@ QT_BEGIN_NAMESPACE
class QPlatformIntegration;
-struct QPlatformIntegrationFactoryInterface : public QFactoryInterface
-{
- virtual QPlatformIntegration *create(const QString &key, const QStringList &paramList) = 0;
-};
-
#define QPlatformIntegrationFactoryInterface_iid "org.qt-project.Qt.QPlatformIntegrationFactoryInterface"
-Q_DECLARE_INTERFACE(QPlatformIntegrationFactoryInterface, QPlatformIntegrationFactoryInterface_iid)
-
-class Q_GUI_EXPORT QPlatformIntegrationPlugin : public QObject, public QPlatformIntegrationFactoryInterface
+class Q_GUI_EXPORT QPlatformIntegrationPlugin : public QObject
{
Q_OBJECT
- Q_INTERFACES(QPlatformIntegrationFactoryInterface:QFactoryInterface)
public:
explicit QPlatformIntegrationPlugin(QObject *parent = 0);
~QPlatformIntegrationPlugin();
- virtual QStringList keys() const = 0;
virtual QPlatformIntegration *create(const QString &key, const QStringList &paramList) = 0;
};
diff --git a/src/gui/kernel/qplatformthemefactory_qpa.cpp b/src/gui/kernel/qplatformthemefactory_qpa.cpp
index c809a7fba3..cc203991db 100644
--- a/src/gui/kernel/qplatformthemefactory_qpa.cpp
+++ b/src/gui/kernel/qplatformthemefactory_qpa.cpp
@@ -66,10 +66,10 @@ QPlatformTheme *QPlatformThemeFactory::create(const QString& key, const QString
// Try loading the plugin from platformPluginPath first:
if (!platformPluginPath.isEmpty()) {
QCoreApplication::addLibraryPath(platformPluginPath);
- if (QPlatformTheme *ret = qLoadPlugin1<QPlatformTheme, QPlatformThemeFactoryInterface>(directLoader(), platform, paramList))
+ if (QPlatformTheme *ret = qLoadPlugin1<QPlatformTheme, QPlatformThemePlugin>(directLoader(), platform, paramList))
return ret;
}
- if (QPlatformTheme *ret = qLoadPlugin1<QPlatformTheme, QPlatformThemeFactoryInterface>(loader(), platform, paramList))
+ if (QPlatformTheme *ret = qLoadPlugin1<QPlatformTheme, QPlatformThemePlugin>(loader(), platform, paramList))
return ret;
#endif
return 0;
diff --git a/src/gui/kernel/qplatformthemeplugin.h b/src/gui/kernel/qplatformthemeplugin.h
index 970eb36f07..cc7bd768c9 100644
--- a/src/gui/kernel/qplatformthemeplugin.h
+++ b/src/gui/kernel/qplatformthemeplugin.h
@@ -58,27 +58,17 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
-
class QPlatformTheme;
-struct QPlatformThemeFactoryInterface : public QFactoryInterface
-{
- virtual QPlatformTheme *create(const QString &key, const QStringList &paramList) = 0;
-};
-
#define QPlatformThemeFactoryInterface_iid "org.qt-project.Qt.QPlatformThemeFactoryInterface"
-Q_DECLARE_INTERFACE(QPlatformThemeFactoryInterface, QPlatformThemeFactoryInterface_iid)
-
-class Q_GUI_EXPORT QPlatformThemePlugin : public QObject, public QPlatformThemeFactoryInterface
+class Q_GUI_EXPORT QPlatformThemePlugin : public QObject
{
Q_OBJECT
- Q_INTERFACES(QPlatformThemeFactoryInterface:QFactoryInterface)
public:
explicit QPlatformThemePlugin(QObject *parent = 0);
~QPlatformThemePlugin();
- virtual QStringList keys() const = 0;
virtual QPlatformTheme *create(const QString &key, const QStringList &paramList) = 0;
};
diff --git a/src/plugins/platforms/cocoa/main.mm b/src/plugins/platforms/cocoa/main.mm
index fc17bd3fe2..35546ec371 100644
--- a/src/plugins/platforms/cocoa/main.mm
+++ b/src/plugins/platforms/cocoa/main.mm
@@ -53,17 +53,9 @@ class QCocoaIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "cocoa.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QCocoaIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "Cocoa";
- return list;
-}
-
QPlatformIntegration * QCocoaIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/directfb/main.cpp b/src/plugins/platforms/directfb/main.cpp
index 86af137249..cc9fcf6df6 100644
--- a/src/plugins/platforms/directfb/main.cpp
+++ b/src/plugins/platforms/directfb/main.cpp
@@ -60,18 +60,9 @@ class QDirectFbIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "directfb.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QDirectFbIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "directfb";
- QT_EGL_BACKEND_STRING(list);
- return list;
-}
-
QPlatformIntegration * QDirectFbIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/eglfs/main.cpp b/src/plugins/platforms/eglfs/main.cpp
index 9680d0ef63..de3fe04acc 100644
--- a/src/plugins/platforms/eglfs/main.cpp
+++ b/src/plugins/platforms/eglfs/main.cpp
@@ -49,17 +49,9 @@ class QEglFSIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "eglfs.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QEglFSIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "EglFS";
- return list;
-}
-
QPlatformIntegration* QEglFSIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/kms/main.cpp b/src/plugins/platforms/kms/main.cpp
index c1baaf3a4e..73a7029721 100644
--- a/src/plugins/platforms/kms/main.cpp
+++ b/src/plugins/platforms/kms/main.cpp
@@ -49,17 +49,9 @@ class QKmsIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "kms.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QKmsIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "kms";
- return list;
-}
-
QPlatformIntegration *QKmsIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/linuxfb/main.cpp b/src/plugins/platforms/linuxfb/main.cpp
index f670b6f5d4..59a3864d81 100644
--- a/src/plugins/platforms/linuxfb/main.cpp
+++ b/src/plugins/platforms/linuxfb/main.cpp
@@ -47,17 +47,9 @@ QT_BEGIN_NAMESPACE
class QLinuxFbIntegrationPlugin : public QPlatformIntegrationPlugin
{
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QLinuxFbIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "LinuxFb";
- return list;
-}
-
QPlatformIntegration* QLinuxFbIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/minimal/main.cpp b/src/plugins/platforms/minimal/main.cpp
index 9ac75e1050..f5649c1cce 100644
--- a/src/plugins/platforms/minimal/main.cpp
+++ b/src/plugins/platforms/minimal/main.cpp
@@ -50,17 +50,9 @@ class QMinimalIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "minimal.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QMinimalIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "Minimal";
- return list;
-}
-
QPlatformIntegration *QMinimalIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/openwfd/main.cpp b/src/plugins/platforms/openwfd/main.cpp
index 0d9508da6c..2db53ea28b 100644
--- a/src/plugins/platforms/openwfd/main.cpp
+++ b/src/plugins/platforms/openwfd/main.cpp
@@ -47,17 +47,9 @@ QT_BEGIN_NAMESPACE
class QOpenWFDIntegrationPlugin : public QPlatformIntegrationPlugin
{
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QOpenWFDIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "OpenWFD";
- return list;
-}
-
QPlatformIntegration* QOpenWFDIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/qnx/main.cpp b/src/plugins/platforms/qnx/main.cpp
index 2dbff096c0..2feab12151 100644
--- a/src/plugins/platforms/qnx/main.cpp
+++ b/src/plugins/platforms/qnx/main.cpp
@@ -44,13 +44,6 @@
QT_BEGIN_NAMESPACE
-QStringList QQnxIntegrationPlugin::keys() const
-{
- QStringList list;
- list << QLatin1String("qnx");
- return list;
-}
-
QPlatformIntegration *QQnxIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/qnx/main.h b/src/plugins/platforms/qnx/main.h
index 4033a29121..b4e229e50e 100644
--- a/src/plugins/platforms/qnx/main.h
+++ b/src/plugins/platforms/qnx/main.h
@@ -48,7 +48,6 @@ class QQnxIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "qnx.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
diff --git a/src/plugins/platforms/windows/main.cpp b/src/plugins/platforms/windows/main.cpp
index b552e539ec..8bc603bc51 100644
--- a/src/plugins/platforms/windows/main.cpp
+++ b/src/plugins/platforms/windows/main.cpp
@@ -107,15 +107,9 @@ class QWindowsIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "windows.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QWindowsIntegrationPlugin::keys() const
-{
- return QStringList(QStringLiteral("windows"));
-}
-
QPlatformIntegration *QWindowsIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
diff --git a/src/plugins/platforms/xcb/main.cpp b/src/plugins/platforms/xcb/main.cpp
index 4474a474fd..eaeccfb47e 100644
--- a/src/plugins/platforms/xcb/main.cpp
+++ b/src/plugins/platforms/xcb/main.cpp
@@ -49,17 +49,9 @@ class QXcbIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformIntegrationFactoryInterface" FILE "xcb.json")
public:
- QStringList keys() const;
QPlatformIntegration *create(const QString&, const QStringList&);
};
-QStringList QXcbIntegrationPlugin::keys() const
-{
- QStringList list;
- list << "xcb";
- return list;
-}
-
QPlatformIntegration* QXcbIntegrationPlugin::create(const QString& system, const QStringList& parameters)
{
if (system.toLower() == "xcb")