diff options
Diffstat (limited to 'tests')
7 files changed, 7 insertions, 27 deletions
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro index e46b243..9c65bc1 100644 --- a/tests/auto/auto.pro +++ b/tests/auto/auto.pro @@ -4,7 +4,7 @@ SUBDIRS += qsensor SUBDIRS += sensors2qmlapi SUBDIRS += legacy_sensors SUBDIRS += qtsensors5 -#SUBDIRS += qsensorgestures +SUBDIRS += qsensorgestures SUBDIRS += qsensorgestureplugins !mac:!win32:SUBDIRS += qsensorgestures_gestures diff --git a/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin.cpp b/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin.cpp index eb245c0..b5c22ec 100644 --- a/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin.cpp +++ b/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin.cpp @@ -106,15 +106,3 @@ QString QTestSensorGesturePlugin::name() const { return "TestGestures"; } - -// Logic stolen from qplugin.h -#define REGISTER_STATIC_PLUGIN_V2(pluginname) \ - static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance() \ - Q_PLUGIN_INSTANCE(pluginname) \ - const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##pluginname() { \ - QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance, 0 }; \ - return plugin; \ - }\ - Q_IMPORT_PLUGIN(pluginname) - -REGISTER_STATIC_PLUGIN_V2(QTestSensorGesturePlugin) diff --git a/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h b/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h index cf1ab32..4801f1f 100644 --- a/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h +++ b/tests/auto/qsensorgestures/plugins/test/qtestsensorgestureplugin_p.h @@ -48,7 +48,7 @@ class QTestSensorGesturePlugin : public QObject, public QSensorGesturePluginInterface { Q_OBJECT - //Q_PLUGIN_METADATA(IID "com.Nokia.QSensorGesturePluginInterface" FILE "plugin.json") + Q_PLUGIN_METADATA(IID "com.Nokia.QSensorGesturePluginInterface") Q_INTERFACES(QSensorGesturePluginInterface) public: diff --git a/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.cpp b/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.cpp index 26bb9ae..e0d551f 100644 --- a/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.cpp +++ b/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.cpp @@ -104,15 +104,3 @@ QString QTestSensorGestureDupPlugin::name() const { return "TestGesturesDup"; } - -// Logic stolen from qplugin.h -#define REGISTER_STATIC_PLUGIN_V2(pluginname) \ - static QT_PREPEND_NAMESPACE(QObject) *qt_plugin_instance() \ - Q_PLUGIN_INSTANCE(pluginname) \ - const QT_PREPEND_NAMESPACE(QStaticPlugin) qt_static_plugin_##pluginname() { \ - QT_PREPEND_NAMESPACE(QStaticPlugin) plugin = { qt_plugin_instance, 0 }; \ - return plugin; \ - }\ - Q_IMPORT_PLUGIN(pluginname) - -REGISTER_STATIC_PLUGIN_V2(QTestSensorGestureDupPlugin) diff --git a/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h b/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h index 18f4577..e4ce72a 100644 --- a/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h +++ b/tests/auto/qsensorgestures/plugins/test1/qtestsensorgestureplugindup.h @@ -48,7 +48,7 @@ class QTestSensorGestureDupPlugin : public QObject, public QSensorGesturePluginInterface { Q_OBJECT - //Q_PLUGIN_METADATA(IID "com.Nokia.QSensorGesturePluginInterface" FILE "plugin.json") + Q_PLUGIN_METADATA(IID "com.Nokia.QSensorGesturePluginInterface") Q_INTERFACES(QSensorGesturePluginInterface) public: diff --git a/tests/auto/qsensorgestures/qsensorgestures.pro b/tests/auto/qsensorgestures/qsensorgestures.pro index 5bccd76..e3b152c 100644 --- a/tests/auto/qsensorgestures/qsensorgestures.pro +++ b/tests/auto/qsensorgestures/qsensorgestures.pro @@ -1,6 +1,7 @@ TEMPLATE = app TARGET = tst_qsensorgesturetest CONFIG += testcase +DEFINES += QT_STATICPLUGIN QT += core testlib sensors QT -= gui diff --git a/tests/auto/qsensorgestures/tst_qsensorgesturetest.cpp b/tests/auto/qsensorgestures/tst_qsensorgesturetest.cpp index bd7d335..00e8cc4 100644 --- a/tests/auto/qsensorgestures/tst_qsensorgesturetest.cpp +++ b/tests/auto/qsensorgestures/tst_qsensorgesturetest.cpp @@ -51,6 +51,9 @@ #include <qsensorgesturerecognizer.h> #include <qsensorgestureplugininterface.h> +Q_IMPORT_PLUGIN(QTestSensorGesturePlugin) +Q_IMPORT_PLUGIN(QTestSensorGestureDupPlugin) + static QString removeParens(const QString &arg) { return arg.left(arg.indexOf("(")); |