From 7715a2d0a55a8988162d32663c572cff7fbf64f6 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sun, 27 May 2012 05:16:14 +0200 Subject: [PATCH] Remove QFactoryInterface from the input plugins Change-Id: Ia4a9dc5b4ef276dca39681848e531b4c9e4f64e2 Reviewed-by: Thiago Macieira --- .../inputcontext/qplatforminputcontextfactory_qpa.cpp | 2 +- .../inputcontext/qplatforminputcontextplugin_p.h | 11 +---------- src/plugins/platforminputcontexts/ibus/main.cpp | 6 ------ src/plugins/platforminputcontexts/maliit/main.cpp | 6 ------ 4 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp b/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp index 3e261ae..595c3cc 100644 --- a/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp +++ b/src/platformsupport/inputcontext/qplatforminputcontextfactory_qpa.cpp @@ -70,7 +70,7 @@ QPlatformInputContext *QPlatformInputContextFactory::create(const QString& key) const QString platform = paramList.takeFirst().toLower(); #if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS) - if (QPlatformInputContext *ret = qLoadPlugin1(loader(), platform, paramList)) + if (QPlatformInputContext *ret = qLoadPlugin1(loader(), platform, paramList)) return ret; #endif return 0; diff --git a/src/platformsupport/inputcontext/qplatforminputcontextplugin_p.h b/src/platformsupport/inputcontext/qplatforminputcontextplugin_p.h index e9e4195..e7b173e 100644 --- a/src/platformsupport/inputcontext/qplatforminputcontextplugin_p.h +++ b/src/platformsupport/inputcontext/qplatforminputcontextplugin_p.h @@ -63,24 +63,15 @@ QT_BEGIN_NAMESPACE class QPlatformInputContext; - struct QPlatformInputContextFactoryInterface : public QFactoryInterface -{ - virtual QPlatformInputContext *create(const QString &key, const QStringList ¶mList) = 0; -}; - #define QPlatformInputContextFactoryInterface_iid "org.qt-project.Qt.QPlatformInputContextFactoryInterface" -Q_DECLARE_INTERFACE(QPlatformInputContextFactoryInterface, QPlatformInputContextFactoryInterface_iid) - -class Q_PLATFORMSUPPORT_EXPORT QPlatformInputContextPlugin : public QObject, public QPlatformInputContextFactoryInterface +class Q_PLATFORMSUPPORT_EXPORT QPlatformInputContextPlugin : public QObject { Q_OBJECT - Q_INTERFACES(QPlatformInputContextFactoryInterface:QFactoryInterface) public: explicit QPlatformInputContextPlugin(QObject *parent = 0); ~QPlatformInputContextPlugin(); - virtual QStringList keys() const = 0; virtual QPlatformInputContext *create(const QString &key, const QStringList ¶mList) = 0; }; diff --git a/src/plugins/platforminputcontexts/ibus/main.cpp b/src/plugins/platforminputcontexts/ibus/main.cpp index d841426..a77076d 100644 --- a/src/plugins/platforminputcontexts/ibus/main.cpp +++ b/src/plugins/platforminputcontexts/ibus/main.cpp @@ -51,15 +51,9 @@ class QIbusPlatformInputContextPlugin : public QPlatformInputContextPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "ibus.json") public: - QStringList keys() const; QIBusPlatformInputContext *create(const QString&, const QStringList&); }; -QStringList QIbusPlatformInputContextPlugin::keys() const -{ - return QStringList(QStringLiteral("ibus")); -} - QIBusPlatformInputContext *QIbusPlatformInputContextPlugin::create(const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); diff --git a/src/plugins/platforminputcontexts/maliit/main.cpp b/src/plugins/platforminputcontexts/maliit/main.cpp index adeaa7b..1762c14 100644 --- a/src/plugins/platforminputcontexts/maliit/main.cpp +++ b/src/plugins/platforminputcontexts/maliit/main.cpp @@ -51,15 +51,9 @@ class QMaliitPlatformInputContextPlugin : public QPlatformInputContextPlugin Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "maliit.json") public: - QStringList keys() const; QPlatformInputContext *create(const QString&, const QStringList&); }; -QStringList QMaliitPlatformInputContextPlugin::keys() const -{ - return QStringList(QStringLiteral("maliit")); -} - QPlatformInputContext *QMaliitPlatformInputContextPlugin::create(const QString& system, const QStringList& paramList) { Q_UNUSED(paramList); -- 2.7.4