Remove QFactoryInterface from the input plugins
Change-Id: Ia4a9dc5b4ef276dca39681848e531b4c9e4f64e2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
cf9264bb6b
commit
7715a2d0a5
@ -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<QPlatformInputContext, QPlatformInputContextFactoryInterface>(loader(), platform, paramList))
|
||||
if (QPlatformInputContext *ret = qLoadPlugin1<QPlatformInputContext, QPlatformInputContextPlugin>(loader(), platform, paramList))
|
||||
return ret;
|
||||
#endif
|
||||
return 0;
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user