summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qsensor/test_sensorplugin.cpp7
-rw-r--r--tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h5
-rw-r--r--tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h3
-rw-r--r--tests/auto/sensors2qmlapi/qbackends.h3
-rw-r--r--tests/auto/sensors2qmlapi/qtemplategestureplugin.h4
5 files changed, 15 insertions, 7 deletions
diff --git a/tests/auto/qsensor/test_sensorplugin.cpp b/tests/auto/qsensor/test_sensorplugin.cpp
index c501377a..c850b676 100644
--- a/tests/auto/qsensor/test_sensorplugin.cpp
+++ b/tests/auto/qsensor/test_sensorplugin.cpp
@@ -54,7 +54,7 @@ class TestSensorPlugin : public QObject,
public QSensorBackendFactory
{
Q_OBJECT
- Q_INTERFACES(QSensorPluginInterface QSensorChangesInterface)
+ Q_INTERFACES(QSensorPluginInterface:QFactoryInterface QSensorChangesInterface)
public:
void registerSensors()
{
@@ -63,6 +63,7 @@ public:
if (recursive) return;
recursive = true;
+
// This is bad code. It caused a crash due to recursively calling
// loadPlugins() in qsensormanager.cpp (because loadPlugins() did
// not set the pluginsLoaded flag soon enough).
@@ -103,6 +104,8 @@ public:
qWarning() << "Can't create backend" << sensor->identifier();
return 0;
}
+ QStringList keys() const { return QStringList() << "test";}
+
};
REGISTER_STATIC_PLUGIN_V2(TestSensorPlugin)
@@ -114,6 +117,8 @@ public:
{
qWarning() << "Loaded the LegacySensorPlugin";
}
+ QStringList keys() const { return QStringList() << "legacy";}
+
};
REGISTER_STATIC_PLUGIN_V1(LegacySensorPlugin)
diff --git a/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h b/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h
index a87f6a0c..d37abd1d 100644
--- a/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h
+++ b/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h
@@ -45,10 +45,11 @@
#include <QObject>
#include <qsensorgestureplugininterface.h>
-class QTestSensorGesturePlugin : public QObject, QSensorGesturePluginInterface
+class QTestSensorGesturePlugin : public QObject, public QSensorGesturePluginInterface
{
Q_OBJECT
- Q_INTERFACES(QSensorGesturePluginInterface)
+ Q_INTERFACES(QSensorGesturePluginInterface:QFactoryInterface)
+
public:
explicit QTestSensorGesturePlugin();
~QTestSensorGesturePlugin();
diff --git a/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h b/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h
index b6c083bf..de96a222 100644
--- a/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h
+++ b/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h
@@ -48,7 +48,8 @@
class QTestSensorGestureDupPlugin : public QObject, public QSensorGesturePluginInterface
{
Q_OBJECT
- Q_INTERFACES(QSensorGesturePluginInterface)
+ Q_INTERFACES(QSensorGesturePluginInterface:QFactoryInterface)
+
public:
explicit QTestSensorGestureDupPlugin();
~QTestSensorGestureDupPlugin();
diff --git a/tests/auto/sensors2qmlapi/qbackends.h b/tests/auto/sensors2qmlapi/qbackends.h
index 01bfa36a..de1c5c02 100644
--- a/tests/auto/sensors2qmlapi/qbackends.h
+++ b/tests/auto/sensors2qmlapi/qbackends.h
@@ -55,7 +55,7 @@ class TestSensorPlugin : public QObject,
public QSensorBackendFactory
{
Q_OBJECT
- Q_INTERFACES(QSensorPluginInterface QSensorChangesInterface)
+ Q_INTERFACES(QSensorPluginInterface:QFactoryInterface QSensorChangesInterface)
public:
void registerSensors()
{
@@ -95,6 +95,7 @@ public:
qWarning() << "Can't create backend" << sensor->identifier();
return 0;
}
+ QStringList keys() const { return QStringList() << "test";}
public:
static QDeclAccelerometer* stAccel;
static QDeclAmbientLightSensor* stAbl;
diff --git a/tests/auto/sensors2qmlapi/qtemplategestureplugin.h b/tests/auto/sensors2qmlapi/qtemplategestureplugin.h
index 04e2662e..cf41e9c6 100644
--- a/tests/auto/sensors2qmlapi/qtemplategestureplugin.h
+++ b/tests/auto/sensors2qmlapi/qtemplategestureplugin.h
@@ -47,10 +47,10 @@
#include <qsensorgestureplugininterface.h>
-class QTemplateGesturePlugin : public QObject, QSensorGesturePluginInterface
+class QTemplateGesturePlugin : public QObject, public QSensorGesturePluginInterface
{
Q_OBJECT
- Q_INTERFACES(QSensorGesturePluginInterface)
+ Q_INTERFACES(QSensorGesturePluginInterface:QFactoryInterface)
public:
explicit QTemplateGesturePlugin();
~QTemplateGesturePlugin();