summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/sensors
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/snippets/sensors')
-rw-r--r--doc/src/snippets/sensors/plugin.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/src/snippets/sensors/plugin.cpp b/doc/src/snippets/sensors/plugin.cpp
index 2567ab74..2c80ed6f 100644
--- a/doc/src/snippets/sensors/plugin.cpp
+++ b/doc/src/snippets/sensors/plugin.cpp
@@ -45,10 +45,10 @@
const char *MyBackend::id = "mybackend";
//! [Plugin]
-class MyPluginClass : public QObject, QSensorPluginInterface, public QSensorBackendFactory
+class MyPluginClass : public QObject, public QSensorPluginInterface, public QSensorBackendFactory
{
Q_OBJECT
- Q_INTERFACES(QSensorPluginInterface)
+ Q_INTERFACES(QSensorPluginInterface:QFactoryInterface)
public:
void registerSensors()
{
@@ -61,6 +61,7 @@ public:
return new MyBackend(sensor);
return 0;
}
+ QStringList keys() const { return QStringList() << "myplugin";}
};
//! [Plugin]