diff options
Diffstat (limited to 'examples/sensors/grue')
-rw-r--r-- | examples/sensors/grue/plugin/main.cpp | 6 | ||||
-rw-r--r-- | examples/sensors/grue/plugin/plugin.json | 1 | ||||
-rw-r--r-- | examples/sensors/grue/plugin/plugin.pro | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/examples/sensors/grue/plugin/main.cpp b/examples/sensors/grue/plugin/main.cpp index 713b12ec..36aec298 100644 --- a/examples/sensors/grue/plugin/main.cpp +++ b/examples/sensors/grue/plugin/main.cpp @@ -48,7 +48,8 @@ class GrueSensorPlugin : public QObject, public QSensorPluginInterface, public QSensorChangesInterface, public QSensorBackendFactory { Q_OBJECT - Q_INTERFACES(QSensorPluginInterface:QFactoryInterface QSensorChangesInterface) + Q_PLUGIN_METADATA(IID "com.nokia.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") + Q_INTERFACES(QSensorPluginInterface QSensorChangesInterface) public: void registerSensors() { @@ -74,10 +75,7 @@ public: return 0; } - QStringList keys() const { return QStringList() << "grue";} }; -Q_EXPORT_PLUGIN2(libsensors_grueplugin, GrueSensorPlugin) - #include "main.moc" diff --git a/examples/sensors/grue/plugin/plugin.json b/examples/sensors/grue/plugin/plugin.json new file mode 100644 index 00000000..8a55b3ae --- /dev/null +++ b/examples/sensors/grue/plugin/plugin.json @@ -0,0 +1 @@ +{ "Keys": [ "notused" ] } diff --git a/examples/sensors/grue/plugin/plugin.pro b/examples/sensors/grue/plugin/plugin.pro index 90d7a01a..489a1cec 100644 --- a/examples/sensors/grue/plugin/plugin.pro +++ b/examples/sensors/grue/plugin/plugin.pro @@ -16,3 +16,6 @@ SOURCES += gruesensorimpl.cpp\ target.path=$$[QT_INSTALL_PLUGINS]/sensors INSTALLS += target +OTHER_FILES += \ + plugin.json + |