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();
|
const QString platform = paramList.takeFirst().toLower();
|
||||||
|
|
||||||
#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
|
#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;
|
return ret;
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -63,24 +63,15 @@ QT_BEGIN_NAMESPACE
|
|||||||
|
|
||||||
class QPlatformInputContext;
|
class QPlatformInputContext;
|
||||||
|
|
||||||
struct QPlatformInputContextFactoryInterface : public QFactoryInterface
|
|
||||||
{
|
|
||||||
virtual QPlatformInputContext *create(const QString &key, const QStringList ¶mList) = 0;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define QPlatformInputContextFactoryInterface_iid "org.qt-project.Qt.QPlatformInputContextFactoryInterface"
|
#define QPlatformInputContextFactoryInterface_iid "org.qt-project.Qt.QPlatformInputContextFactoryInterface"
|
||||||
|
|
||||||
Q_DECLARE_INTERFACE(QPlatformInputContextFactoryInterface, QPlatformInputContextFactoryInterface_iid)
|
class Q_PLATFORMSUPPORT_EXPORT QPlatformInputContextPlugin : public QObject
|
||||||
|
|
||||||
class Q_PLATFORMSUPPORT_EXPORT QPlatformInputContextPlugin : public QObject, public QPlatformInputContextFactoryInterface
|
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_INTERFACES(QPlatformInputContextFactoryInterface:QFactoryInterface)
|
|
||||||
public:
|
public:
|
||||||
explicit QPlatformInputContextPlugin(QObject *parent = 0);
|
explicit QPlatformInputContextPlugin(QObject *parent = 0);
|
||||||
~QPlatformInputContextPlugin();
|
~QPlatformInputContextPlugin();
|
||||||
|
|
||||||
virtual QStringList keys() const = 0;
|
|
||||||
virtual QPlatformInputContext *create(const QString &key, const QStringList ¶mList) = 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")
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "ibus.json")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QStringList keys() const;
|
|
||||||
QIBusPlatformInputContext *create(const QString&, const QStringList&);
|
QIBusPlatformInputContext *create(const QString&, const QStringList&);
|
||||||
};
|
};
|
||||||
|
|
||||||
QStringList QIbusPlatformInputContextPlugin::keys() const
|
|
||||||
{
|
|
||||||
return QStringList(QStringLiteral("ibus"));
|
|
||||||
}
|
|
||||||
|
|
||||||
QIBusPlatformInputContext *QIbusPlatformInputContextPlugin::create(const QString& system, const QStringList& paramList)
|
QIBusPlatformInputContext *QIbusPlatformInputContextPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(paramList);
|
Q_UNUSED(paramList);
|
||||||
|
@ -51,15 +51,9 @@ class QMaliitPlatformInputContextPlugin : public QPlatformInputContextPlugin
|
|||||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "maliit.json")
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "maliit.json")
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QStringList keys() const;
|
|
||||||
QPlatformInputContext *create(const QString&, const QStringList&);
|
QPlatformInputContext *create(const QString&, const QStringList&);
|
||||||
};
|
};
|
||||||
|
|
||||||
QStringList QMaliitPlatformInputContextPlugin::keys() const
|
|
||||||
{
|
|
||||||
return QStringList(QStringLiteral("maliit"));
|
|
||||||
}
|
|
||||||
|
|
||||||
QPlatformInputContext *QMaliitPlatformInputContextPlugin::create(const QString& system, const QStringList& paramList)
|
QPlatformInputContext *QMaliitPlatformInputContextPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
{
|
{
|
||||||
Q_UNUSED(paramList);
|
Q_UNUSED(paramList);
|
||||||
|
Loading…
Reference in New Issue
Block a user