Use new plugin system for Input Context plugins.
Change-Id: Ifd1f63499afba546a745815762263a58ebf66460 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>bb10
parent
13f3346d34
commit
4e4fd63371
|
|
@ -68,7 +68,7 @@ class QPlatformInputContext;
|
|||
virtual QPlatformInputContext *create(const QString &key, const QStringList ¶mList) = 0;
|
||||
};
|
||||
|
||||
#define QPlatformInputContextFactoryInterface_iid "com.nokia.Qt.QPlatformInputContextFactoryInterface"
|
||||
#define QPlatformInputContextFactoryInterface_iid "org.qt-project.Qt.QPlatformInputContextFactoryInterface"
|
||||
|
||||
Q_DECLARE_INTERFACE(QPlatformInputContextFactoryInterface, QPlatformInputContextFactoryInterface_iid)
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"Keys": [ "ibus" ]
|
||||
}
|
||||
|
|
@ -15,5 +15,7 @@ HEADERS += $$PWD/qibusplatforminputcontext.h \
|
|||
$$PWD/qibusinputcontextproxy.h \
|
||||
$$PWD/qibustypes.h
|
||||
|
||||
OTHER_FILES += $$PWD/ibus.json
|
||||
|
||||
target.path += $$[QT_INSTALL_PLUGINS]/platforminputcontexts
|
||||
INSTALLS += target
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QIbusPlatformInputContextPlugin : public QPlatformInputContextPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "ibus.json")
|
||||
|
||||
public:
|
||||
QStringList keys() const;
|
||||
QIBusPlatformInputContext *create(const QString&, const QStringList&);
|
||||
|
|
@ -66,6 +69,6 @@ QIBusPlatformInputContext *QIbusPlatformInputContextPlugin::create(const QString
|
|||
return 0;
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN2(ibusplatforminputcontextplugin, QIbusPlatformInputContextPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
|
|
|||
|
|
@ -47,6 +47,9 @@ QT_BEGIN_NAMESPACE
|
|||
|
||||
class QMaliitPlatformInputContextPlugin : public QPlatformInputContextPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QPlatformInputContextFactoryInterface" FILE "maliit.json")
|
||||
|
||||
public:
|
||||
QStringList keys() const;
|
||||
QPlatformInputContext *create(const QString&, const QStringList&);
|
||||
|
|
@ -66,6 +69,6 @@ QPlatformInputContext *QMaliitPlatformInputContextPlugin::create(const QString&
|
|||
return 0;
|
||||
}
|
||||
|
||||
Q_EXPORT_PLUGIN2(maliitplatforminputcontextplugin, QMaliitPlatformInputContextPlugin)
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#include "main.moc"
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"Keys": [ "maliit" ]
|
||||
}
|
||||
|
|
@ -15,5 +15,7 @@ HEADERS += $$PWD/qmaliitplatforminputcontext.h \
|
|||
$$PWD/serveraddressproxy.h \
|
||||
$$PWD/contextadaptor.h
|
||||
|
||||
OTHER_FILES += $$PWD/maliit.json
|
||||
|
||||
target.path += $$[QT_INSTALL_PLUGINS]/platforminputcontexts
|
||||
INSTALLS += target
|
||||
|
|
|
|||
Loading…
Reference in New Issue