summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/sensors
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2011-11-11 10:46:31 +1000
committerQt by Nokia <qt-info@nokia.com>2011-11-14 06:54:31 +0100
commitd95c5fee483816558246586c4621d96c84b224c0 (patch)
tree6d458feddc453baf26ef85130f8447e8d0d2a6ab /doc/src/snippets/sensors
parent1f20d5ef3e27981e2af2c6533656694ea3335678 (diff)
remove qmobilitypluginsearch and use the QFactoryLoader instead.
Change-Id: Ifdd2031d309a5ac4cbeedc5d7cdb6ba9cbb845c3 Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com> Sanity-Review: Lincoln Ramsay <lincoln.ramsay@nokia.com>
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]