From fd116bc59489c43e2edde3b8ade7d91094458c35 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Fri, 12 Apr 2013 14:33:58 +1000 Subject: [PATCH] make this compile with qt5 --- .../accelerometeradaptorplugin.cpp | 2 + .../accelerometeradaptorplugin.h | 3 + adaptors/accelerometeradaptor/plugin.json | 1 + .../alsadaptor-asciiplugin.cpp | 2 + .../alsadaptor-ascii/alsadaptor-asciiplugin.h | 3 + adaptors/alsadaptor-ascii/plugin.json | 1 + .../alsadaptor-sysfsplugin.cpp | 2 + .../alsadaptor-sysfs/alsadaptor-sysfsplugin.h | 4 + adaptors/alsadaptor-sysfs/plugin.json | 1 + adaptors/alsadaptor/alsadaptor.pro | 2 +- adaptors/alsadaptor/alsadaptorplugin.cpp | 2 + adaptors/alsadaptor/alsadaptorplugin.h | 3 + adaptors/alsadaptor/plugin.json | 1 + .../gyroscopeadaptorplugin.cpp | 2 + .../gyroscopeadaptor/gyroscopeadaptorplugin.h | 3 + adaptors/gyroscopeadaptor/plugin.json | 1 + .../kbslideradaptor/kbslideradaptorplugin.cpp | 2 + .../kbslideradaptor/kbslideradaptorplugin.h | 3 + adaptors/kbslideradaptor/plugin.json | 1 + .../magnetometeradaptor-asciiplugin.cpp | 2 + .../magnetometeradaptor-ascii/plugin.json | 1 + .../magnetometeradaptorplugin-ncdk.cpp | 2 + adaptors/magnetometeradaptor-ncdk/plugin.json | 1 + .../magnetometeradaptorplugin.cpp | 2 + .../magnetometeradaptorplugin.h | 3 + adaptors/magnetometeradaptor/plugin.json | 1 + .../mrstaccelerometeradaptorplugin.cpp | 2 + .../mrstaccelerometeradaptorplugin.h | 3 + adaptors/mrstaccelerometer/plugin.json | 1 + .../oaktrailaccelerometeradaptor.cpp | 2 +- .../oaktrailaccelerometeradaptorplugin.cpp | 2 + .../oaktrailaccelerometeradaptorplugin.h | 3 + adaptors/oaktrailaccelerometer/plugin.json | 1 + .../oemtabletaccelerometeradaptor.cpp | 2 +- .../oemtabletaccelerometeradaptorplugin.cpp | 2 + .../oemtabletaccelerometeradaptorplugin.h | 4 + adaptors/oemtabletaccelerometer/plugin.json | 1 + .../oemtabletalsadaptor-asciiplugin.cpp | 2 + .../oemtabletalsadaptor-asciiplugin.h | 5 +- .../oemtabletalsadaptor-ascii/plugin.json | 1 + .../oemtabletgyroscopeadaptorplugin.h | 3 + .../oemtabletgyroscopeadaptor/plugin.json | 1 + .../oemtabletmagnetometeradaptorplugin.h | 3 + .../oemtabletmagnetometeradaptor/plugin.json | 1 + .../pegatronaccelerometeradaptorplugin.cpp | 2 + .../pegatronaccelerometeradaptorplugin.h | 3 + .../pegatronaccelerometeradaptor/plugin.json | 1 + adaptors/proximityadaptor-ascii/plugin.json | 1 + .../proximityadaptor-asciiplugin.cpp | 2 + .../proximityadaptor-asciiplugin.h | 3 + adaptors/proximityadaptor-evdev/plugin.json | 1 + .../proximityadaptor-evdevplugin.cpp | 2 + .../proximityadaptor-evdevplugin.h | 3 + adaptors/proximityadaptor/plugin.json | 1 + .../proximityadaptor/proximityadaptor.pro | 2 +- .../proximityadaptorplugin.cpp | 2 + .../proximityadaptor/proximityadaptorplugin.h | 3 + adaptors/steaccelerometeradaptor/plugin.json | 1 + .../steaccelerometeradaptorplugin.cpp | 2 + .../steaccelerometeradaptorplugin.h | 3 + adaptors/tapadaptor/plugin.json | 1 + adaptors/tapadaptor/tapadaptorplugin.cpp | 2 + adaptors/tapadaptor/tapadaptorplugin.h | 3 + adaptors/touchadaptor/plugin.json | 1 + adaptors/touchadaptor/touchadaptorplugin.cpp | 2 + adaptors/touchadaptor/touchadaptorplugin.h | 3 + .../accelerometerchainplugin.cpp | 2 + .../accelerometerchainplugin.h | 4 + chains/accelerometerchain/plugin.json | 1 + .../orientationchainplugin.cpp | 2 + .../orientationchain/orientationchainplugin.h | 3 + chains/orientationchain/plugin.json | 1 + common-config.pri | 2 +- core/core.pro | 2 +- core/inputdevadaptor.cpp | 2 +- core/loader.cpp | 2 +- core/loader.h | 2 +- core/logging.cpp | 2 +- core/parameterparser.cpp | 2 +- core/plugin.json | 1 + core/sysfsadaptor.cpp | 2 +- examples/adaptorplugin/plugin.json | 1 + .../adaptorplugin/sampleadaptorplugin.cpp | 2 + examples/adaptorplugin/sampleadaptorplugin.h | 3 + examples/chainplugin/plugin.json | 1 + examples/chainplugin/samplechainplugin.cpp | 2 + examples/chainplugin/samplechainplugin.h | 3 + examples/filterplugin/plugin.json | 1 + examples/filterplugin/samplefilterplugin.cpp | 2 + examples/filterplugin/samplefilterplugin.h | 3 + examples/sensorplugin/plugin.json | 1 + examples/sensorplugin/sampleplugin.cpp | 2 + examples/sensorplugin/sampleplugin.h | 3 + .../coordinatealignfilterplugin.cpp | 2 + .../coordinatealignfilterplugin.h | 3 + filters/coordinatealignfilter/plugin.json | 1 + .../declinationfilter/declinationfilter.cpp | 16 ++ .../declinationfilterplugin.cpp | 2 + .../declinationfilterplugin.h | 3 + filters/declinationfilter/plugin.json | 1 + .../downsamplefilterplugin.cpp | 2 + .../downsamplefilter/downsamplefilterplugin.h | 3 + filters/downsamplefilter/plugin.json | 1 + .../orientationinterpreterplugin.cpp | 2 + .../orientationinterpreterplugin.h | 3 + filters/orientationinterpreter/plugin.json | 1 + filters/rotationfilter/plugin.json | 1 + .../rotationfilter/rotationfilterplugin.cpp | 2 + filters/rotationfilter/rotationfilterplugin.h | 3 + qt-api/abstractsensor_i.cpp | 9 +- qt-api/abstractsensor_i.h | 4 + qt-api/accelerometersensor_i.cpp | 9 + qt-api/accelerometersensor_i.h | 7 +- qt-api/gyroscopesensor_i.cpp | 9 + qt-api/gyroscopesensor_i.h | 4 + qt-api/magnetometersensor_i.cpp | 11 +- qt-api/magnetometersensor_i.h | 4 + qt-api/rotationsensor_i.cpp | 9 + qt-api/rotationsensor_i.h | 5 + qt-api/sensormanager_i.cpp | 3 +- rpm/sensord-daemon-conf-setup | 20 ++ rpm/sensord.service | 13 ++ rpm/sensorfw-qt5.spec | 191 ++++++++++++++++++ rpm/sensorfw-qt5.yaml | 89 ++++++++ rpm/sensorfw-rpmlintrc | 2 + rpm/sensorfw.changes | 188 +++++++++++++++++ rpm/sensorfw.spec | 191 ++++++++++++++++++ rpm/sensorfw.yaml | 89 ++++++++ .../accelerometerplugin.cpp | 2 + .../accelerometersensor/accelerometerplugin.h | 4 + sensors/accelerometersensor/plugin.json | 1 + sensors/alssensor/alsplugin.cpp | 2 + sensors/alssensor/alsplugin.h | 3 + sensors/alssensor/plugin.json | 1 + sensors/compasssensor/compassplugin.cpp | 2 + sensors/compasssensor/compassplugin.h | 3 + sensors/compasssensor/plugin.json | 1 + sensors/contextplugin/contextplugin.cpp | 2 + sensors/contextplugin/contextplugin.h | 3 + sensors/contextplugin/plugin.json | 1 + sensors/gyroscopesensor/gyroscopeplugin.cpp | 2 + sensors/gyroscopesensor/gyroscopeplugin.h | 3 + sensors/gyroscopesensor/plugin.json | 1 + .../magnetometersensor/magnetometerplugin.cpp | 2 + .../magnetometersensor/magnetometerplugin.h | 3 + sensors/magnetometersensor/plugin.json | 1 + .../orientationsensor/orientationplugin.cpp | 2 + sensors/orientationsensor/orientationplugin.h | 3 + sensors/orientationsensor/plugin.json | 1 + sensors/proximitysensor/plugin.json | 1 + sensors/proximitysensor/proximityplugin.cpp | 2 + sensors/proximitysensor/proximityplugin.h | 3 + sensors/rotationsensor/plugin.json | 1 + sensors/rotationsensor/rotationplugin.cpp | 2 + sensors/rotationsensor/rotationplugin.h | 3 + sensors/tapsensor/plugin.json | 1 + sensors/tapsensor/tapplugin.cpp | 2 + sensors/tapsensor/tapplugin.h | 3 + .../fakeadaptor/fakeadaptorplugin.cpp | 2 + .../benchmark/fakeadaptor/fakeadaptorplugin.h | 3 + tests/benchmark/fakeadaptor/plugin.json | 1 + tests/client/clientapitest.cpp | 20 +- tests/client/clientapitest.h | 2 +- tests/metadata/metadatatest.cpp | 16 +- tests/testutils/datafaker/datafaker.cpp | 2 +- .../sensorfakeopen/sensorfakeopen.cpp | 6 +- 166 files changed, 1164 insertions(+), 40 deletions(-) create mode 100644 adaptors/accelerometeradaptor/plugin.json create mode 100644 adaptors/alsadaptor-ascii/plugin.json create mode 100644 adaptors/alsadaptor-sysfs/plugin.json create mode 100644 adaptors/alsadaptor/plugin.json create mode 100644 adaptors/gyroscopeadaptor/plugin.json create mode 100644 adaptors/kbslideradaptor/plugin.json create mode 100644 adaptors/magnetometeradaptor-ascii/plugin.json create mode 100644 adaptors/magnetometeradaptor-ncdk/plugin.json create mode 100644 adaptors/magnetometeradaptor/plugin.json create mode 100644 adaptors/mrstaccelerometer/plugin.json create mode 100644 adaptors/oaktrailaccelerometer/plugin.json create mode 100644 adaptors/oemtabletaccelerometer/plugin.json create mode 100644 adaptors/oemtabletalsadaptor-ascii/plugin.json create mode 100644 adaptors/oemtabletgyroscopeadaptor/plugin.json create mode 100644 adaptors/oemtabletmagnetometeradaptor/plugin.json create mode 100644 adaptors/pegatronaccelerometeradaptor/plugin.json create mode 100644 adaptors/proximityadaptor-ascii/plugin.json create mode 100644 adaptors/proximityadaptor-evdev/plugin.json create mode 100644 adaptors/proximityadaptor/plugin.json create mode 100644 adaptors/steaccelerometeradaptor/plugin.json create mode 100644 adaptors/tapadaptor/plugin.json create mode 100644 adaptors/touchadaptor/plugin.json create mode 100644 chains/accelerometerchain/plugin.json create mode 100644 chains/orientationchain/plugin.json create mode 100644 core/plugin.json create mode 100644 examples/adaptorplugin/plugin.json create mode 100644 examples/chainplugin/plugin.json create mode 100644 examples/filterplugin/plugin.json create mode 100644 examples/sensorplugin/plugin.json create mode 100644 filters/coordinatealignfilter/plugin.json create mode 100644 filters/declinationfilter/plugin.json create mode 100644 filters/downsamplefilter/plugin.json create mode 100644 filters/orientationinterpreter/plugin.json create mode 100644 filters/rotationfilter/plugin.json create mode 100644 rpm/sensord-daemon-conf-setup create mode 100644 rpm/sensord.service create mode 100644 rpm/sensorfw-qt5.spec create mode 100644 rpm/sensorfw-qt5.yaml create mode 100644 rpm/sensorfw-rpmlintrc create mode 100644 rpm/sensorfw.changes create mode 100644 rpm/sensorfw.spec create mode 100644 rpm/sensorfw.yaml create mode 100644 sensors/accelerometersensor/plugin.json create mode 100644 sensors/alssensor/plugin.json create mode 100644 sensors/compasssensor/plugin.json create mode 100644 sensors/contextplugin/plugin.json create mode 100644 sensors/gyroscopesensor/plugin.json create mode 100644 sensors/magnetometersensor/plugin.json create mode 100644 sensors/orientationsensor/plugin.json create mode 100644 sensors/proximitysensor/plugin.json create mode 100644 sensors/rotationsensor/plugin.json create mode 100644 sensors/tapsensor/plugin.json create mode 100644 tests/benchmark/fakeadaptor/plugin.json diff --git a/adaptors/accelerometeradaptor/accelerometeradaptorplugin.cpp b/adaptors/accelerometeradaptor/accelerometeradaptorplugin.cpp index c36ecd31..a38179f6 100644 --- a/adaptors/accelerometeradaptor/accelerometeradaptorplugin.cpp +++ b/adaptors/accelerometeradaptor/accelerometeradaptorplugin.cpp @@ -35,4 +35,6 @@ void AccelerometerAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("accelerometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(accelerometeradaptor, AccelerometerAdaptorPlugin) +#endif diff --git a/adaptors/accelerometeradaptor/accelerometeradaptorplugin.h b/adaptors/accelerometeradaptor/accelerometeradaptorplugin.h index 6b48d8d2..d4cd1aef 100644 --- a/adaptors/accelerometeradaptor/accelerometeradaptorplugin.h +++ b/adaptors/accelerometeradaptor/accelerometeradaptorplugin.h @@ -30,6 +30,9 @@ class AccelerometerAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/accelerometeradaptor/plugin.json b/adaptors/accelerometeradaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/accelerometeradaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/alsadaptor-ascii/alsadaptor-asciiplugin.cpp b/adaptors/alsadaptor-ascii/alsadaptor-asciiplugin.cpp index 932e9836..09cc7454 100644 --- a/adaptors/alsadaptor-ascii/alsadaptor-asciiplugin.cpp +++ b/adaptors/alsadaptor-ascii/alsadaptor-asciiplugin.cpp @@ -40,4 +40,6 @@ void ALSAdaptorAsciiPlugin::Register(class Loader&) sm.registerDeviceAdaptor("alsadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(alsadaptor, ALSAdaptorAsciiPlugin) +#endif diff --git a/adaptors/alsadaptor-ascii/alsadaptor-asciiplugin.h b/adaptors/alsadaptor-ascii/alsadaptor-asciiplugin.h index a0e26aab..6af4619e 100644 --- a/adaptors/alsadaptor-ascii/alsadaptor-asciiplugin.h +++ b/adaptors/alsadaptor-ascii/alsadaptor-asciiplugin.h @@ -36,6 +36,9 @@ class ALSAdaptorAsciiPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/alsadaptor-ascii/plugin.json b/adaptors/alsadaptor-ascii/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/alsadaptor-ascii/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.cpp b/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.cpp index f1240770..648b620d 100644 --- a/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.cpp +++ b/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.cpp @@ -36,4 +36,6 @@ void ALSAdaptorSysfsPlugin::Register(class Loader&) sm.registerDeviceAdaptor("alsadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(alsadaptor-sysfs, ALSAdaptorSysfsPlugin) +#endif diff --git a/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.h b/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.h index 75d746c8..c6090a17 100644 --- a/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.h +++ b/adaptors/alsadaptor-sysfs/alsadaptor-sysfsplugin.h @@ -31,6 +31,10 @@ class ALSAdaptorSysfsPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif + private: void Register(class Loader& l); }; diff --git a/adaptors/alsadaptor-sysfs/plugin.json b/adaptors/alsadaptor-sysfs/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/alsadaptor-sysfs/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/alsadaptor/alsadaptor.pro b/adaptors/alsadaptor/alsadaptor.pro index 9e9aad87..e59434bf 100644 --- a/adaptors/alsadaptor/alsadaptor.pro +++ b/adaptors/alsadaptor/alsadaptor.pro @@ -8,6 +8,6 @@ SOURCES += alsadaptor.cpp \ include( ../adaptor-config.pri ) -!mce_disable { +mce { DEFINES += SENSORFW_MCE_WATCHER } diff --git a/adaptors/alsadaptor/alsadaptorplugin.cpp b/adaptors/alsadaptor/alsadaptorplugin.cpp index 6428a5ba..3b116162 100644 --- a/adaptors/alsadaptor/alsadaptorplugin.cpp +++ b/adaptors/alsadaptor/alsadaptorplugin.cpp @@ -35,4 +35,6 @@ void ALSAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("alsadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(alsadaptor, ALSAdaptorPlugin) +#endif diff --git a/adaptors/alsadaptor/alsadaptorplugin.h b/adaptors/alsadaptor/alsadaptorplugin.h index 8728d06a..73715dba 100644 --- a/adaptors/alsadaptor/alsadaptorplugin.h +++ b/adaptors/alsadaptor/alsadaptorplugin.h @@ -30,6 +30,9 @@ class ALSAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/alsadaptor/plugin.json b/adaptors/alsadaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/alsadaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/gyroscopeadaptor/gyroscopeadaptorplugin.cpp b/adaptors/gyroscopeadaptor/gyroscopeadaptorplugin.cpp index 612f9b69..7915e2b3 100644 --- a/adaptors/gyroscopeadaptor/gyroscopeadaptorplugin.cpp +++ b/adaptors/gyroscopeadaptor/gyroscopeadaptorplugin.cpp @@ -35,4 +35,6 @@ void GyroscopeAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("gyroscopeadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(gyroscopeadaptor, GyroscopeAdaptorPlugin) +#endif diff --git a/adaptors/gyroscopeadaptor/gyroscopeadaptorplugin.h b/adaptors/gyroscopeadaptor/gyroscopeadaptorplugin.h index 96d200d0..832b84ea 100644 --- a/adaptors/gyroscopeadaptor/gyroscopeadaptorplugin.h +++ b/adaptors/gyroscopeadaptor/gyroscopeadaptorplugin.h @@ -31,6 +31,9 @@ class GyroscopeAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/gyroscopeadaptor/plugin.json b/adaptors/gyroscopeadaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/gyroscopeadaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/kbslideradaptor/kbslideradaptorplugin.cpp b/adaptors/kbslideradaptor/kbslideradaptorplugin.cpp index 52aa7dbd..a52508cd 100644 --- a/adaptors/kbslideradaptor/kbslideradaptorplugin.cpp +++ b/adaptors/kbslideradaptor/kbslideradaptorplugin.cpp @@ -35,4 +35,6 @@ void KeyboardSliderAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("kbslideradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(kbslideradaptor, KeyboardSliderAdaptorPlugin) +#endif diff --git a/adaptors/kbslideradaptor/kbslideradaptorplugin.h b/adaptors/kbslideradaptor/kbslideradaptorplugin.h index bf460309..75f08ddb 100644 --- a/adaptors/kbslideradaptor/kbslideradaptorplugin.h +++ b/adaptors/kbslideradaptor/kbslideradaptorplugin.h @@ -30,6 +30,9 @@ class KeyboardSliderAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/kbslideradaptor/plugin.json b/adaptors/kbslideradaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/kbslideradaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/magnetometeradaptor-ascii/magnetometeradaptor-asciiplugin.cpp b/adaptors/magnetometeradaptor-ascii/magnetometeradaptor-asciiplugin.cpp index fd171240..7ee22d2a 100644 --- a/adaptors/magnetometeradaptor-ascii/magnetometeradaptor-asciiplugin.cpp +++ b/adaptors/magnetometeradaptor-ascii/magnetometeradaptor-asciiplugin.cpp @@ -39,4 +39,6 @@ void MagnetometerAdaptorAsciiPlugin::Register(class Loader&) sm.registerDeviceAdaptor("magnetometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(magnetometeradaptor, MagnetometerAdaptorAsciiPlugin) +#endif diff --git a/adaptors/magnetometeradaptor-ascii/plugin.json b/adaptors/magnetometeradaptor-ascii/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/magnetometeradaptor-ascii/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/magnetometeradaptor-ncdk/magnetometeradaptorplugin-ncdk.cpp b/adaptors/magnetometeradaptor-ncdk/magnetometeradaptorplugin-ncdk.cpp index 0092b060..88faa375 100644 --- a/adaptors/magnetometeradaptor-ncdk/magnetometeradaptorplugin-ncdk.cpp +++ b/adaptors/magnetometeradaptor-ncdk/magnetometeradaptorplugin-ncdk.cpp @@ -34,4 +34,6 @@ void MagnetometerAdaptorPluginNCDK::Register(class Loader&) sm.registerDeviceAdaptor("magnetometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(magnetometeradaptor, MagnetometerAdaptorPluginNCDK) +#endif diff --git a/adaptors/magnetometeradaptor-ncdk/plugin.json b/adaptors/magnetometeradaptor-ncdk/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/magnetometeradaptor-ncdk/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/magnetometeradaptor/magnetometeradaptorplugin.cpp b/adaptors/magnetometeradaptor/magnetometeradaptorplugin.cpp index c97238d2..5544abfa 100644 --- a/adaptors/magnetometeradaptor/magnetometeradaptorplugin.cpp +++ b/adaptors/magnetometeradaptor/magnetometeradaptorplugin.cpp @@ -35,4 +35,6 @@ void MagnetometerAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("magnetometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(magnetometeradaptor, MagnetometerAdaptorPlugin) +#endif diff --git a/adaptors/magnetometeradaptor/magnetometeradaptorplugin.h b/adaptors/magnetometeradaptor/magnetometeradaptorplugin.h index d7276ddd..ca8fcfff 100644 --- a/adaptors/magnetometeradaptor/magnetometeradaptorplugin.h +++ b/adaptors/magnetometeradaptor/magnetometeradaptorplugin.h @@ -30,6 +30,9 @@ class MagnetometerAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/magnetometeradaptor/plugin.json b/adaptors/magnetometeradaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/magnetometeradaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/mrstaccelerometer/mrstaccelerometeradaptorplugin.cpp b/adaptors/mrstaccelerometer/mrstaccelerometeradaptorplugin.cpp index e2f81feb..1820564e 100644 --- a/adaptors/mrstaccelerometer/mrstaccelerometeradaptorplugin.cpp +++ b/adaptors/mrstaccelerometer/mrstaccelerometeradaptorplugin.cpp @@ -34,4 +34,6 @@ void MRSTAccelerometerAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("accelerometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(accelerometeradaptor-mrst, MRSTAccelerometerAdaptorPlugin) +#endif diff --git a/adaptors/mrstaccelerometer/mrstaccelerometeradaptorplugin.h b/adaptors/mrstaccelerometer/mrstaccelerometeradaptorplugin.h index 7f7f600e..6a2652f1 100644 --- a/adaptors/mrstaccelerometer/mrstaccelerometeradaptorplugin.h +++ b/adaptors/mrstaccelerometer/mrstaccelerometeradaptorplugin.h @@ -29,6 +29,9 @@ class MRSTAccelerometerAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/mrstaccelerometer/plugin.json b/adaptors/mrstaccelerometer/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/mrstaccelerometer/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptor.cpp b/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptor.cpp index 732558af..575bc9aa 100644 --- a/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptor.cpp +++ b/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptor.cpp @@ -14,7 +14,7 @@ OaktrailAccelAdaptor::OaktrailAccelAdaptor (const QString& id) : struct stat st; devPath = Config::configuration ()->value ("oaktrail_acc_sys_path").toString (); - if ( lstat (devPath.toAscii().constData(), &st) < 0 ) { + if ( lstat (devPath.toLatin1().constData(), &st) < 0 ) { sensordLogW () << devPath << "no found"; return; } diff --git a/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptorplugin.cpp b/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptorplugin.cpp index 4e83ad74..f2c3a750 100644 --- a/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptorplugin.cpp +++ b/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptorplugin.cpp @@ -10,4 +10,6 @@ void OaktrailAccelerometerAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("accelerometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(oaktrailaccelerometeradaptor, OaktrailAccelerometerAdaptorPlugin) +#endif diff --git a/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptorplugin.h b/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptorplugin.h index 19e7a80d..3e31f972 100644 --- a/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptorplugin.h +++ b/adaptors/oaktrailaccelerometer/oaktrailaccelerometeradaptorplugin.h @@ -5,6 +5,9 @@ class OaktrailAccelerometerAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/oaktrailaccelerometer/plugin.json b/adaptors/oaktrailaccelerometer/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/oaktrailaccelerometer/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptor.cpp b/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptor.cpp index b2404f1e..db633b89 100644 --- a/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptor.cpp +++ b/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptor.cpp @@ -14,7 +14,7 @@ OemtabletAccelAdaptor::OemtabletAccelAdaptor (const QString& id) : struct stat st; devPath = Config::configuration ()->value ("oem_tablet_acc_sys_path").toString (); - if ( lstat (devPath.toAscii().constData(), &st) < 0 ) { + if ( lstat (devPath.toLatin1().constData(), &st) < 0 ) { sensordLogW () << devPath << "no found"; return; } diff --git a/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptorplugin.cpp b/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptorplugin.cpp index 04649330..9784e1f8 100644 --- a/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptorplugin.cpp +++ b/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptorplugin.cpp @@ -10,4 +10,6 @@ void OemtabletAccelerometerAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("accelerometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(oemtabletaccelerometeradaptor, OemtabletAccelerometerAdaptorPlugin) +#endif diff --git a/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptorplugin.h b/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptorplugin.h index bdeaabaf..83d18a65 100644 --- a/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptorplugin.h +++ b/adaptors/oemtabletaccelerometer/oemtabletaccelerometeradaptorplugin.h @@ -5,6 +5,10 @@ class OemtabletAccelerometerAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif + private: void Register(class Loader& l); }; diff --git a/adaptors/oemtabletaccelerometer/plugin.json b/adaptors/oemtabletaccelerometer/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/oemtabletaccelerometer/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-asciiplugin.cpp b/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-asciiplugin.cpp index b17bc4c9..485bc3fe 100644 --- a/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-asciiplugin.cpp +++ b/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-asciiplugin.cpp @@ -9,4 +9,6 @@ void OEMTabletALSAdaptorAsciiPlugin::Register(class Loader&) sm.registerDeviceAdaptor("alsadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(alsadaptor, OEMTabletALSAdaptorAsciiPlugin) +#endif diff --git a/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-asciiplugin.h b/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-asciiplugin.h index 7545b571..24efa55d 100644 --- a/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-asciiplugin.h +++ b/adaptors/oemtabletalsadaptor-ascii/oemtabletalsadaptor-asciiplugin.h @@ -5,7 +5,10 @@ class OEMTabletALSAdaptorAsciiPlugin : public Plugin { - private: +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif +private: void Register(class Loader& l); }; diff --git a/adaptors/oemtabletalsadaptor-ascii/plugin.json b/adaptors/oemtabletalsadaptor-ascii/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/oemtabletalsadaptor-ascii/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/oemtabletgyroscopeadaptor/oemtabletgyroscopeadaptorplugin.h b/adaptors/oemtabletgyroscopeadaptor/oemtabletgyroscopeadaptorplugin.h index 699546af..4da1395c 100644 --- a/adaptors/oemtabletgyroscopeadaptor/oemtabletgyroscopeadaptorplugin.h +++ b/adaptors/oemtabletgyroscopeadaptor/oemtabletgyroscopeadaptorplugin.h @@ -5,6 +5,9 @@ class OEMTabletGyroscopeAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/oemtabletgyroscopeadaptor/plugin.json b/adaptors/oemtabletgyroscopeadaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/oemtabletgyroscopeadaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/oemtabletmagnetometeradaptor/oemtabletmagnetometeradaptorplugin.h b/adaptors/oemtabletmagnetometeradaptor/oemtabletmagnetometeradaptorplugin.h index 219bbd61..30c859e5 100644 --- a/adaptors/oemtabletmagnetometeradaptor/oemtabletmagnetometeradaptorplugin.h +++ b/adaptors/oemtabletmagnetometeradaptor/oemtabletmagnetometeradaptorplugin.h @@ -5,6 +5,9 @@ class OemtabletMagnetometerAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/oemtabletmagnetometeradaptor/plugin.json b/adaptors/oemtabletmagnetometeradaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/oemtabletmagnetometeradaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptorplugin.cpp b/adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptorplugin.cpp index 52391840..17d82420 100644 --- a/adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptorplugin.cpp +++ b/adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptorplugin.cpp @@ -10,4 +10,6 @@ void PegatronAccelerometerAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("accelerometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(pegatronaccelerometeradaptor, PegatronAccelerometerAdaptorPlugin) +#endif diff --git a/adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptorplugin.h b/adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptorplugin.h index 137a9237..ea40f53e 100644 --- a/adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptorplugin.h +++ b/adaptors/pegatronaccelerometeradaptor/pegatronaccelerometeradaptorplugin.h @@ -5,6 +5,9 @@ class PegatronAccelerometerAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/pegatronaccelerometeradaptor/plugin.json b/adaptors/pegatronaccelerometeradaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/pegatronaccelerometeradaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/proximityadaptor-ascii/plugin.json b/adaptors/proximityadaptor-ascii/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/proximityadaptor-ascii/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/proximityadaptor-ascii/proximityadaptor-asciiplugin.cpp b/adaptors/proximityadaptor-ascii/proximityadaptor-asciiplugin.cpp index c25cd2cb..ec29b9b7 100644 --- a/adaptors/proximityadaptor-ascii/proximityadaptor-asciiplugin.cpp +++ b/adaptors/proximityadaptor-ascii/proximityadaptor-asciiplugin.cpp @@ -39,4 +39,6 @@ void ProximityAdaptorAsciiPlugin::Register(class Loader&) sm.registerDeviceAdaptor("proximityadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(proximityadaptor, ProximityAdaptorAsciiPlugin) +#endif diff --git a/adaptors/proximityadaptor-ascii/proximityadaptor-asciiplugin.h b/adaptors/proximityadaptor-ascii/proximityadaptor-asciiplugin.h index 2e7a8cb2..42db2229 100644 --- a/adaptors/proximityadaptor-ascii/proximityadaptor-asciiplugin.h +++ b/adaptors/proximityadaptor-ascii/proximityadaptor-asciiplugin.h @@ -35,6 +35,9 @@ class ProximityAdaptorAsciiPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/proximityadaptor-evdev/plugin.json b/adaptors/proximityadaptor-evdev/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/proximityadaptor-evdev/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/proximityadaptor-evdev/proximityadaptor-evdevplugin.cpp b/adaptors/proximityadaptor-evdev/proximityadaptor-evdevplugin.cpp index 3d9312fc..26591ef5 100644 --- a/adaptors/proximityadaptor-evdev/proximityadaptor-evdevplugin.cpp +++ b/adaptors/proximityadaptor-evdev/proximityadaptor-evdevplugin.cpp @@ -36,4 +36,6 @@ void ProximityAdaptorEvdevPlugin::Register(class Loader&) sm.registerDeviceAdaptor("proximityadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(proximityadaptor-evdev, ProximityAdaptorEvdevPlugin) +#endif diff --git a/adaptors/proximityadaptor-evdev/proximityadaptor-evdevplugin.h b/adaptors/proximityadaptor-evdev/proximityadaptor-evdevplugin.h index 1dbe26ae..9a219c0b 100644 --- a/adaptors/proximityadaptor-evdev/proximityadaptor-evdevplugin.h +++ b/adaptors/proximityadaptor-evdev/proximityadaptor-evdevplugin.h @@ -31,6 +31,9 @@ class ProximityAdaptorEvdevPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/proximityadaptor/plugin.json b/adaptors/proximityadaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/proximityadaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/proximityadaptor/proximityadaptor.pro b/adaptors/proximityadaptor/proximityadaptor.pro index 45a4f4cf..b0073c77 100644 --- a/adaptors/proximityadaptor/proximityadaptor.pro +++ b/adaptors/proximityadaptor/proximityadaptor.pro @@ -8,6 +8,6 @@ SOURCES += proximityadaptor.cpp \ include( ../adaptor-config.pri ) -!mce_disable { +mce { DEFINES += SENSORFW_MCE_WATCHER } diff --git a/adaptors/proximityadaptor/proximityadaptorplugin.cpp b/adaptors/proximityadaptor/proximityadaptorplugin.cpp index d38e5f1d..a15e4173 100644 --- a/adaptors/proximityadaptor/proximityadaptorplugin.cpp +++ b/adaptors/proximityadaptor/proximityadaptorplugin.cpp @@ -36,4 +36,6 @@ void ProximityAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("proximityadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(proximityadaptor, ProximityAdaptorPlugin) +#endif diff --git a/adaptors/proximityadaptor/proximityadaptorplugin.h b/adaptors/proximityadaptor/proximityadaptorplugin.h index da2bed38..92ef74c9 100644 --- a/adaptors/proximityadaptor/proximityadaptorplugin.h +++ b/adaptors/proximityadaptor/proximityadaptorplugin.h @@ -31,6 +31,9 @@ class ProximityAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/steaccelerometeradaptor/plugin.json b/adaptors/steaccelerometeradaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/steaccelerometeradaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/steaccelerometeradaptor/steaccelerometeradaptorplugin.cpp b/adaptors/steaccelerometeradaptor/steaccelerometeradaptorplugin.cpp index d3e12c87..fe69a046 100644 --- a/adaptors/steaccelerometeradaptor/steaccelerometeradaptorplugin.cpp +++ b/adaptors/steaccelerometeradaptor/steaccelerometeradaptorplugin.cpp @@ -10,4 +10,6 @@ void SteAccelerometerAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("accelerometeradaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(steaccelerometeradaptor,SteAccelerometerAdaptorPlugin) +#endif diff --git a/adaptors/steaccelerometeradaptor/steaccelerometeradaptorplugin.h b/adaptors/steaccelerometeradaptor/steaccelerometeradaptorplugin.h index 3aaa0011..34e928bf 100644 --- a/adaptors/steaccelerometeradaptor/steaccelerometeradaptorplugin.h +++ b/adaptors/steaccelerometeradaptor/steaccelerometeradaptorplugin.h @@ -5,6 +5,9 @@ class SteAccelerometerAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/tapadaptor/plugin.json b/adaptors/tapadaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/tapadaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/tapadaptor/tapadaptorplugin.cpp b/adaptors/tapadaptor/tapadaptorplugin.cpp index ade48953..b8bac666 100644 --- a/adaptors/tapadaptor/tapadaptorplugin.cpp +++ b/adaptors/tapadaptor/tapadaptorplugin.cpp @@ -35,4 +35,6 @@ void TapAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("tapadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(tapadaptor, TapAdaptorPlugin) +#endif diff --git a/adaptors/tapadaptor/tapadaptorplugin.h b/adaptors/tapadaptor/tapadaptorplugin.h index 6756e2bd..78f58288 100644 --- a/adaptors/tapadaptor/tapadaptorplugin.h +++ b/adaptors/tapadaptor/tapadaptorplugin.h @@ -30,6 +30,9 @@ class TapAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/adaptors/touchadaptor/plugin.json b/adaptors/touchadaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/adaptors/touchadaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/adaptors/touchadaptor/touchadaptorplugin.cpp b/adaptors/touchadaptor/touchadaptorplugin.cpp index ab6e1ca1..916b9714 100644 --- a/adaptors/touchadaptor/touchadaptorplugin.cpp +++ b/adaptors/touchadaptor/touchadaptorplugin.cpp @@ -35,4 +35,6 @@ void TouchAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("touchadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(touchadaptor, TouchAdaptorPlugin) +#endif diff --git a/adaptors/touchadaptor/touchadaptorplugin.h b/adaptors/touchadaptor/touchadaptorplugin.h index 96eb8306..7aaca757 100644 --- a/adaptors/touchadaptor/touchadaptorplugin.h +++ b/adaptors/touchadaptor/touchadaptorplugin.h @@ -30,6 +30,9 @@ class TouchAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/chains/accelerometerchain/accelerometerchainplugin.cpp b/chains/accelerometerchain/accelerometerchainplugin.cpp index 1ebdbb1e..f63028b7 100644 --- a/chains/accelerometerchain/accelerometerchainplugin.cpp +++ b/chains/accelerometerchain/accelerometerchainplugin.cpp @@ -40,4 +40,6 @@ QStringList AccelerometerChainPlugin::Dependencies() { return QString("coordinatealignfilter:accelerometeradaptor").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(accelerometerchain, AccelerometerChainPlugin) +#endif diff --git a/chains/accelerometerchain/accelerometerchainplugin.h b/chains/accelerometerchain/accelerometerchainplugin.h index 8e69dacf..6c114861 100644 --- a/chains/accelerometerchain/accelerometerchainplugin.h +++ b/chains/accelerometerchain/accelerometerchainplugin.h @@ -30,6 +30,10 @@ class AccelerometerChainPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif + private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/chains/accelerometerchain/plugin.json b/chains/accelerometerchain/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/chains/accelerometerchain/plugin.json @@ -0,0 +1 @@ +{} diff --git a/chains/orientationchain/orientationchainplugin.cpp b/chains/orientationchain/orientationchainplugin.cpp index 62414994..1ae7f4ac 100644 --- a/chains/orientationchain/orientationchainplugin.cpp +++ b/chains/orientationchain/orientationchainplugin.cpp @@ -40,4 +40,6 @@ QStringList OrientationChainPlugin::Dependencies() { return QString("orientationinterpreter:accelerometerchain").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(orientationchain, OrientationChainPlugin) +#endif diff --git a/chains/orientationchain/orientationchainplugin.h b/chains/orientationchain/orientationchainplugin.h index 07525ac5..6fe7b426 100644 --- a/chains/orientationchain/orientationchainplugin.h +++ b/chains/orientationchain/orientationchainplugin.h @@ -30,6 +30,9 @@ class OrientationChainPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/chains/orientationchain/plugin.json b/chains/orientationchain/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/chains/orientationchain/plugin.json @@ -0,0 +1 @@ +{} diff --git a/common-config.pri b/common-config.pri index 8061f5e7..51e67772 100644 --- a/common-config.pri +++ b/common-config.pri @@ -10,7 +10,7 @@ CONFIG += debug CONFIG += thread # Maemo specific options -CONFIG += contextprovider +#CONFIG += contextprovider # DEPRECATED: CompassChain is now provided by separate package # sensorfw-plugins-compasslogic diff --git a/core/core.pro b/core/core.pro index da62162c..9c47b9a4 100644 --- a/core/core.pro +++ b/core/core.pro @@ -68,7 +68,7 @@ HEADERS += sensormanager.h \ config.h \ nodebase.h -!mce_disable { +mce { SOURCES += mcewatcher.cpp HEADERS += mcewatcher.h DEFINES += SENSORFW_MCE_WATCHER diff --git a/core/inputdevadaptor.cpp b/core/inputdevadaptor.cpp index 4e9d58d5..3845edaf 100644 --- a/core/inputdevadaptor.cpp +++ b/core/inputdevadaptor.cpp @@ -100,7 +100,7 @@ int InputDevAdaptor::getInputDevices(const QString& typeName) } else { - QByteArray byteArray = readFromFile(usedDevicePollFilePath_.toAscii()); + QByteArray byteArray = readFromFile(usedDevicePollFilePath_.toLatin1()); cachedInterval_ = byteArray.size() > 0 ? byteArray.toInt() : 0; } diff --git a/core/loader.cpp b/core/loader.cpp index 124443c1..d3cb061b 100644 --- a/core/loader.cpp +++ b/core/loader.cpp @@ -108,7 +108,7 @@ bool Loader::loadPlugin(const QString& name, QString* errorString) { QString error; bool loaded = false; - QStringList newPluginNames; + QStringList newPluginNames; QList newPlugins; if (loadedPluginNames_.contains(name)) { diff --git a/core/loader.h b/core/loader.h index 76841ac0..84231b1a 100644 --- a/core/loader.h +++ b/core/loader.h @@ -76,7 +76,7 @@ class Loader */ QString resolveRealPluginName(const QString& pluginName) const; - QStringList loadedPluginNames_; /**< list of loaded plugins */ + QStringList loadedPluginNames_; /**< list of loaded plugins */ }; #endif diff --git a/core/logging.cpp b/core/logging.cpp index 5d3123c7..d026efb8 100644 --- a/core/logging.cpp +++ b/core/logging.cpp @@ -113,7 +113,7 @@ void SensordLogger::init(int target, const QString& logFilePath, const QString& if (initialized) return; logTarget = target; - appName = name.toAscii(); + appName = name.toLatin1(); if (target & STDERR_FILENO){ fcntl(STDERR_FILENO, F_SETFL, O_WRONLY); } diff --git a/core/parameterparser.cpp b/core/parameterparser.cpp index aa48882e..695af411 100644 --- a/core/parameterparser.cpp +++ b/core/parameterparser.cpp @@ -65,6 +65,6 @@ void ParameterParser::applyPropertyMap(QObject* object, const QMap::const_iterator it = propertyMap.constBegin(); it != propertyMap.constEnd(); ++it) { - object->setProperty(it.key().toAscii().data(), QVariant(it.value())); + object->setProperty(it.key().toLatin1().data(), QVariant(it.value())); } } diff --git a/core/plugin.json b/core/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/core/plugin.json @@ -0,0 +1 @@ +{} diff --git a/core/sysfsadaptor.cpp b/core/sysfsadaptor.cpp index fa6f2b18..763c095e 100644 --- a/core/sysfsadaptor.cpp +++ b/core/sysfsadaptor.cpp @@ -222,7 +222,7 @@ bool SysfsAdaptor::openFds() int fd; for (int i = 0; i < paths_.size(); i++) { - if ((fd = open(paths_.at(i).toAscii().constData(), O_RDONLY)) == -1) { + if ((fd = open(paths_.at(i).toLatin1().constData(), O_RDONLY)) == -1) { sensordLogW() << "open(): " << strerror(errno); return false; } diff --git a/examples/adaptorplugin/plugin.json b/examples/adaptorplugin/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/examples/adaptorplugin/plugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/adaptorplugin/sampleadaptorplugin.cpp b/examples/adaptorplugin/sampleadaptorplugin.cpp index 50fbc90d..6a4a39da 100644 --- a/examples/adaptorplugin/sampleadaptorplugin.cpp +++ b/examples/adaptorplugin/sampleadaptorplugin.cpp @@ -39,4 +39,6 @@ void SampleAdaptorPlugin::Register(class Loader&) } // Plugin must be exported for it to loaded properly +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(sampleadaptor, SampleAdaptorPlugin) +#endif diff --git a/examples/adaptorplugin/sampleadaptorplugin.h b/examples/adaptorplugin/sampleadaptorplugin.h index 736ba6a8..2d2ea4be 100644 --- a/examples/adaptorplugin/sampleadaptorplugin.h +++ b/examples/adaptorplugin/sampleadaptorplugin.h @@ -30,6 +30,9 @@ class SampleAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/examples/chainplugin/plugin.json b/examples/chainplugin/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/examples/chainplugin/plugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/chainplugin/samplechainplugin.cpp b/examples/chainplugin/samplechainplugin.cpp index f9bdada8..68cab39d 100644 --- a/examples/chainplugin/samplechainplugin.cpp +++ b/examples/chainplugin/samplechainplugin.cpp @@ -44,4 +44,6 @@ QStringList SampleChainPlugin::Dependencies() { return QString("sampleadaptor:samplefilter").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(samplechain, SampleChainPlugin) +#endif diff --git a/examples/chainplugin/samplechainplugin.h b/examples/chainplugin/samplechainplugin.h index 1db46e5f..271d7d8a 100644 --- a/examples/chainplugin/samplechainplugin.h +++ b/examples/chainplugin/samplechainplugin.h @@ -30,6 +30,9 @@ class SampleChainPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/examples/filterplugin/plugin.json b/examples/filterplugin/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/examples/filterplugin/plugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/filterplugin/samplefilterplugin.cpp b/examples/filterplugin/samplefilterplugin.cpp index 1e4a04d5..0aaa0095 100644 --- a/examples/filterplugin/samplefilterplugin.cpp +++ b/examples/filterplugin/samplefilterplugin.cpp @@ -35,4 +35,6 @@ void SampleFilterPlugin::Register(class Loader&) sm.registerFilter("samplefilter"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(samplefilter, SampleFilterPlugin) +#endif diff --git a/examples/filterplugin/samplefilterplugin.h b/examples/filterplugin/samplefilterplugin.h index 0e554f49..3f5ebb1b 100644 --- a/examples/filterplugin/samplefilterplugin.h +++ b/examples/filterplugin/samplefilterplugin.h @@ -30,6 +30,9 @@ class SampleFilterPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/examples/sensorplugin/plugin.json b/examples/sensorplugin/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/examples/sensorplugin/plugin.json @@ -0,0 +1 @@ +{} diff --git a/examples/sensorplugin/sampleplugin.cpp b/examples/sensorplugin/sampleplugin.cpp index f39eec51..512ec697 100644 --- a/examples/sensorplugin/sampleplugin.cpp +++ b/examples/sensorplugin/sampleplugin.cpp @@ -43,4 +43,6 @@ QStringList SamplePlugin::Dependencies() { return QString("samplechain").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(samplesensor, SamplePlugin) +#endif diff --git a/examples/sensorplugin/sampleplugin.h b/examples/sensorplugin/sampleplugin.h index 380375c3..49ecdc00 100644 --- a/examples/sensorplugin/sampleplugin.h +++ b/examples/sensorplugin/sampleplugin.h @@ -30,6 +30,9 @@ class SamplePlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/filters/coordinatealignfilter/coordinatealignfilterplugin.cpp b/filters/coordinatealignfilter/coordinatealignfilterplugin.cpp index 69888d4a..250021e9 100644 --- a/filters/coordinatealignfilter/coordinatealignfilterplugin.cpp +++ b/filters/coordinatealignfilter/coordinatealignfilterplugin.cpp @@ -35,4 +35,6 @@ void CoordinateAlignFilterPlugin::Register(class Loader&) sm.registerFilter("coordinatealignfilter"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(coordinatealignfilter, CoordinateAlignFilterPlugin) +#endif diff --git a/filters/coordinatealignfilter/coordinatealignfilterplugin.h b/filters/coordinatealignfilter/coordinatealignfilterplugin.h index 65a88664..191a6714 100644 --- a/filters/coordinatealignfilter/coordinatealignfilterplugin.h +++ b/filters/coordinatealignfilter/coordinatealignfilterplugin.h @@ -30,6 +30,9 @@ class CoordinateAlignFilterPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/filters/coordinatealignfilter/plugin.json b/filters/coordinatealignfilter/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/filters/coordinatealignfilter/plugin.json @@ -0,0 +1 @@ +{} diff --git a/filters/declinationfilter/declinationfilter.cpp b/filters/declinationfilter/declinationfilter.cpp index 1b2f3938..02b43847 100644 --- a/filters/declinationfilter/declinationfilter.cpp +++ b/filters/declinationfilter/declinationfilter.cpp @@ -48,9 +48,17 @@ void DeclinationFilter::correct(unsigned, const CompassData* data) lastUpdate_ = newOrientation.timestamp_; } newOrientation.correctedDegrees_ = newOrientation.degrees_; +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) if(declinationCorrection_) +#else + if(declinationCorrection_.loadAcquire() == 0) +#endif { +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) newOrientation.correctedDegrees_ += declinationCorrection_; +#else + newOrientation.correctedDegrees_ += declinationCorrection_.loadAcquire(); +#endif newOrientation.correctedDegrees_ %= 360; sensordLogT() << "DeclinationFilter corrected degree " << newOrientation.degrees_ << " => " << newOrientation.correctedDegrees_ << ". Level: " << newOrientation.level_; } @@ -79,12 +87,20 @@ void DeclinationFilter::loadSettings() } declinationCorrection_ = value; +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) sensordLogD() << "Fetched declination correction from GConf: " << declinationCorrection_; +#else + sensordLogD() << "Fetched declination correction from GConf: " << declinationCorrection_.loadAcquire(); +#endif g_object_unref(client); } int DeclinationFilter::declinationCorrection() { loadSettings(); +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) return declinationCorrection_; +#else + return declinationCorrection_.loadAcquire(); +#endif } diff --git a/filters/declinationfilter/declinationfilterplugin.cpp b/filters/declinationfilter/declinationfilterplugin.cpp index 80c6dfed..cd792336 100644 --- a/filters/declinationfilter/declinationfilterplugin.cpp +++ b/filters/declinationfilter/declinationfilterplugin.cpp @@ -35,4 +35,6 @@ void DeclinationFilterPlugin::Register(class Loader&) sm.registerFilter("declinationfilter"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(declinationfilter, DeclinationFilterPlugin) +#endif diff --git a/filters/declinationfilter/declinationfilterplugin.h b/filters/declinationfilter/declinationfilterplugin.h index 92142707..8adda1cd 100644 --- a/filters/declinationfilter/declinationfilterplugin.h +++ b/filters/declinationfilter/declinationfilterplugin.h @@ -30,6 +30,9 @@ class DeclinationFilterPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/filters/declinationfilter/plugin.json b/filters/declinationfilter/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/filters/declinationfilter/plugin.json @@ -0,0 +1 @@ +{} diff --git a/filters/downsamplefilter/downsamplefilterplugin.cpp b/filters/downsamplefilter/downsamplefilterplugin.cpp index 7828f2c7..9f1dcceb 100644 --- a/filters/downsamplefilter/downsamplefilterplugin.cpp +++ b/filters/downsamplefilter/downsamplefilterplugin.cpp @@ -35,4 +35,6 @@ void DownsampleFilterPlugin::Register(class Loader&) sm.registerFilter("downsamplefilter"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(downsamplefilter, DownsampleFilterPlugin) +#endif diff --git a/filters/downsamplefilter/downsamplefilterplugin.h b/filters/downsamplefilter/downsamplefilterplugin.h index 954103ff..9ec85dd5 100644 --- a/filters/downsamplefilter/downsamplefilterplugin.h +++ b/filters/downsamplefilter/downsamplefilterplugin.h @@ -30,6 +30,9 @@ class DownsampleFilterPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/filters/downsamplefilter/plugin.json b/filters/downsamplefilter/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/filters/downsamplefilter/plugin.json @@ -0,0 +1 @@ +{} diff --git a/filters/orientationinterpreter/orientationinterpreterplugin.cpp b/filters/orientationinterpreter/orientationinterpreterplugin.cpp index 27364ee1..b27100ee 100644 --- a/filters/orientationinterpreter/orientationinterpreterplugin.cpp +++ b/filters/orientationinterpreter/orientationinterpreterplugin.cpp @@ -36,4 +36,6 @@ void OrientationInterpreterPlugin::Register(class Loader&) sm.registerFilter("orientationinterpreter"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(orientationinterpreter, OrientationInterpreterPlugin) +#endif diff --git a/filters/orientationinterpreter/orientationinterpreterplugin.h b/filters/orientationinterpreter/orientationinterpreterplugin.h index 3ced4c7a..fff6220a 100644 --- a/filters/orientationinterpreter/orientationinterpreterplugin.h +++ b/filters/orientationinterpreter/orientationinterpreterplugin.h @@ -30,6 +30,9 @@ class OrientationInterpreterPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/filters/orientationinterpreter/plugin.json b/filters/orientationinterpreter/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/filters/orientationinterpreter/plugin.json @@ -0,0 +1 @@ +{} diff --git a/filters/rotationfilter/plugin.json b/filters/rotationfilter/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/filters/rotationfilter/plugin.json @@ -0,0 +1 @@ +{} diff --git a/filters/rotationfilter/rotationfilterplugin.cpp b/filters/rotationfilter/rotationfilterplugin.cpp index eb44380c..79a96e56 100644 --- a/filters/rotationfilter/rotationfilterplugin.cpp +++ b/filters/rotationfilter/rotationfilterplugin.cpp @@ -36,4 +36,6 @@ void RotationFilterPlugin::Register(class Loader&) sm.registerFilter("rotationfilter"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(rotationfilter, RotationFilterPlugin) +#endif diff --git a/filters/rotationfilter/rotationfilterplugin.h b/filters/rotationfilter/rotationfilterplugin.h index 2391430f..33e02987 100644 --- a/filters/rotationfilter/rotationfilterplugin.h +++ b/filters/rotationfilter/rotationfilterplugin.h @@ -30,6 +30,9 @@ class RotationFilterPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/qt-api/abstractsensor_i.cpp b/qt-api/abstractsensor_i.cpp index b5e719b3..0198b4a2 100644 --- a/qt-api/abstractsensor_i.cpp +++ b/qt-api/abstractsensor_i.cpp @@ -33,8 +33,11 @@ struct AbstractSensorChannelInterface::AbstractSensorChannelInterfaceImpl : publ { AbstractSensorChannelInterfaceImpl(QObject* parent, int sessionId, const QString& path, const char* interfaceName); +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) void dbusConnectNotify(const char* signal) { QDBusAbstractInterface::connectNotify(signal); } - +#else + void dbusConnectNotify(const QMetaMethod& signal) { QDBusAbstractInterface::connectNotify(signal); } +#endif SensorError errorCode_; QString errorString_; int sessionId_; @@ -364,7 +367,11 @@ QDBusMessage AbstractSensorChannelInterface::callWithArgumentList(QDBus::CallMod return pimpl_->call(mode, method, args); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) void AbstractSensorChannelInterface::dbusConnectNotify(const char* signal) +#else +void AbstractSensorChannelInterface::dbusConnectNotify(const QMetaMethod& signal) +#endif { pimpl_->dbusConnectNotify(signal); } diff --git a/qt-api/abstractsensor_i.h b/qt-api/abstractsensor_i.h index 2e7199ff..9c02a893 100644 --- a/qt-api/abstractsensor_i.h +++ b/qt-api/abstractsensor_i.h @@ -463,7 +463,11 @@ private Q_SLOTS: // METHODS * Wrapper for function of QDBusAbstractInterface. * For more details see QDBusAbstractInterface docs. */ +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) void dbusConnectNotify(const char* signal); +#else + void dbusConnectNotify(const QMetaMethod& signal); +#endif private: struct AbstractSensorChannelInterfaceImpl; diff --git a/qt-api/accelerometersensor_i.cpp b/qt-api/accelerometersensor_i.cpp index 461460db..0d4ddd9a 100644 --- a/qt-api/accelerometersensor_i.cpp +++ b/qt-api/accelerometersensor_i.cpp @@ -86,9 +86,18 @@ XYZ AccelerometerSensorChannelInterface::get() return getAccessor("xyz"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) void AccelerometerSensorChannelInterface::connectNotify(const char* signal) +#else +void AccelerometerSensorChannelInterface::connectNotify(const QMetaMethod &signal) +#endif { +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) if(QLatin1String(signal) == SIGNAL(frameAvailable(QVector))) +#else + static const QMetaMethod frameAvailableSignal = QMetaMethod::fromSignal(&AccelerometerSensorChannelInterface::frameAvailable); + if(signal == frameAvailableSignal) +#endif frameAvailableConnected = true; dbusConnectNotify(signal); } diff --git a/qt-api/accelerometersensor_i.h b/qt-api/accelerometersensor_i.h index 6afe4ec5..cb8c518f 100644 --- a/qt-api/accelerometersensor_i.h +++ b/qt-api/accelerometersensor_i.h @@ -98,8 +98,13 @@ class AccelerometerSensorChannelInterface : public AbstractSensorChannelInterfac static AccelerometerSensorChannelInterface* interface(const QString& id); protected: + +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) virtual void connectNotify(const char* signal); - virtual bool dataReceivedImpl(); +#else + virtual void connectNotify(const QMetaMethod & signal); +#endif +virtual bool dataReceivedImpl(); private: bool frameAvailableConnected; /**< has applicaiton connected slot for frameAvailable signal. */ diff --git a/qt-api/gyroscopesensor_i.cpp b/qt-api/gyroscopesensor_i.cpp index 5416e647..9ff7af35 100644 --- a/qt-api/gyroscopesensor_i.cpp +++ b/qt-api/gyroscopesensor_i.cpp @@ -86,9 +86,18 @@ bool GyroscopeSensorChannelInterface::dataReceivedImpl() return true; } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) void GyroscopeSensorChannelInterface::connectNotify(const char* signal) +#else +void GyroscopeSensorChannelInterface::connectNotify(const QMetaMethod &signal) +#endif { +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) if(QLatin1String(signal) == SIGNAL(frameAvailable(QVector))) +#else + static const QMetaMethod frameAvailableSignal = QMetaMethod::fromSignal(&GyroscopeSensorChannelInterface::frameAvailable); + if(signal == frameAvailableSignal) +#endif frameAvailableConnected = true; dbusConnectNotify(signal); } diff --git a/qt-api/gyroscopesensor_i.h b/qt-api/gyroscopesensor_i.h index 37600553..737f7c08 100644 --- a/qt-api/gyroscopesensor_i.h +++ b/qt-api/gyroscopesensor_i.h @@ -99,7 +99,11 @@ class GyroscopeSensorChannelInterface : public AbstractSensorChannelInterface static GyroscopeSensorChannelInterface* interface(const QString& id); protected: +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) virtual void connectNotify(const char* signal); +#else + virtual void connectNotify(const QMetaMethod & signal); +#endif virtual bool dataReceivedImpl(); private: diff --git a/qt-api/magnetometersensor_i.cpp b/qt-api/magnetometersensor_i.cpp index cd7c7393..fd17bc4a 100644 --- a/qt-api/magnetometersensor_i.cpp +++ b/qt-api/magnetometersensor_i.cpp @@ -83,9 +83,18 @@ bool MagnetometerSensorChannelInterface::dataReceivedImpl() return true; } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) void MagnetometerSensorChannelInterface::connectNotify(const char* signal) +#else +void MagnetometerSensorChannelInterface::connectNotify(const QMetaMethod &signal) +#endif { - if(QLatin1String(signal) == SIGNAL(frameAvailable(QVector))) +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) + if(QLatin1String(signal) == SIGNAL(frameAvailable(QVector))) +#else + static const QMetaMethod frameAvailableSignal = QMetaMethod::fromSignal(&MagnetometerSensorChannelInterface::frameAvailable); + if(signal == frameAvailableSignal) +#endif frameAvailableConnected = true; dbusConnectNotify(signal); } diff --git a/qt-api/magnetometersensor_i.h b/qt-api/magnetometersensor_i.h index f4333d09..b22f7b84 100644 --- a/qt-api/magnetometersensor_i.h +++ b/qt-api/magnetometersensor_i.h @@ -100,7 +100,11 @@ class MagnetometerSensorChannelInterface : public AbstractSensorChannelInterface static MagnetometerSensorChannelInterface* interface(const QString& id); protected: +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) virtual void connectNotify(const char* signal); +#else + virtual void connectNotify(const QMetaMethod & signal); +#endif virtual bool dataReceivedImpl(); private: diff --git a/qt-api/rotationsensor_i.cpp b/qt-api/rotationsensor_i.cpp index a5005175..5c1145c7 100644 --- a/qt-api/rotationsensor_i.cpp +++ b/qt-api/rotationsensor_i.cpp @@ -92,9 +92,18 @@ bool RotationSensorChannelInterface::hasZ() return getAccessor("hasZ"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) void RotationSensorChannelInterface::connectNotify(const char* signal) +#else +void RotationSensorChannelInterface::connectNotify(const QMetaMethod &signal) +#endif { +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) if(QLatin1String(signal) == SIGNAL(frameAvailable(QVector))) +#else + static const QMetaMethod frameAvailableSignal = QMetaMethod::fromSignal(&RotationSensorChannelInterface::frameAvailable); + if(signal == frameAvailableSignal) +#endif frameAvailableConnected = true; dbusConnectNotify(signal); } diff --git a/qt-api/rotationsensor_i.h b/qt-api/rotationsensor_i.h index 62546b6c..7dcd6824 100644 --- a/qt-api/rotationsensor_i.h +++ b/qt-api/rotationsensor_i.h @@ -109,7 +109,12 @@ class RotationSensorChannelInterface: public AbstractSensorChannelInterface static RotationSensorChannelInterface* interface(const QString& id); protected: +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) virtual void connectNotify(const char* signal); +#else + virtual void connectNotify(const QMetaMethod &signal); +#endif + virtual bool dataReceivedImpl(); private: diff --git a/qt-api/sensormanager_i.cpp b/qt-api/sensormanager_i.cpp index 7033bc23..86a47f49 100644 --- a/qt-api/sensormanager_i.cpp +++ b/qt-api/sensormanager_i.cpp @@ -31,8 +31,9 @@ #include "sensormanager_i.h" #include +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_DECLARE_METATYPE( QAbstractSocket::SocketState) - +#endif void __attribute__ ((constructor)) qtapi_init(void) { qRegisterMetaType("SocketState"); diff --git a/rpm/sensord-daemon-conf-setup b/rpm/sensord-daemon-conf-setup new file mode 100644 index 00000000..16132d28 --- /dev/null +++ b/rpm/sensord-daemon-conf-setup @@ -0,0 +1,20 @@ +#!/bin/bash + +if [ -x "/usr/sbin/sensord" ] ; then + if [ ! -f "/etc/sensorfw/primaryuse.conf" ] ; then + # Determine the correct "primary" config file: the first conf file + # whose basename is a substring of boardname, if any (i.e. 'foo.conf' + # matches all devices which have 'foo' in their /etc/boardname) + if [ -f /etc/boardname ]; then + for f in /etc/sensorfw/*conf; do + fbase=`basename $f '.conf' | sed s/sensord-//` + grep -q $fbase /etc/boardname + if [ $? -eq 0 ]; then + ln -s $f /etc/sensorfw/primaryuse.conf + break + fi + done + fi + + fi +fi diff --git a/rpm/sensord.service b/rpm/sensord.service new file mode 100644 index 00000000..eb69ad45 --- /dev/null +++ b/rpm/sensord.service @@ -0,0 +1,13 @@ +[Unit] +Description=Sensor daemon for sensor framwork +After=boardname.service + +[Service] +Type=forking +ExecStartPre=/bin/sh /usr/bin/sensord-daemon-conf-setup +ExecStart=/usr/sbin/sensord -c=/etc/sensorfw/primaryuse.conf -d --log-target=4 --log-file-path=/var/log/sensord.log +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=jolla-middleware.target + diff --git a/rpm/sensorfw-qt5.spec b/rpm/sensorfw-qt5.spec new file mode 100644 index 00000000..dc412b45 --- /dev/null +++ b/rpm/sensorfw-qt5.spec @@ -0,0 +1,191 @@ +# +# Do NOT Edit the Auto-generated Part! +# Generated by: spectacle version 0.25 +# + +Name: sensorfw + +# >> macros +# << macros + +Summary: Sensor Framework +Version: 0.7.2.2 +Release: 0 +Group: System/Sensor Framework +License: LGPLv2+ +URL: http://gitorious.org/sensorfw +Source0: %{name}-%{version}.tar.bz2 +Source1: sensorfw-rpmlintrc +Source2: sensord.service +Source3: sensord-daemon-conf-setup +Source100: sensorfw.yaml +Requires: qt +Requires: GConf-dbus +Requires: %{name}-configs +Requires: systemd +Requires(preun): systemd +Requires(post): /sbin/ldconfig +Requires(post): systemd +Requires(postun): /sbin/ldconfig +Requires(postun): systemd +BuildRequires: pkgconfig(QtCore) +BuildRequires: pkgconfig(gconf-2.0) +BuildRequires: pkgconfig(contextprovider-1.0) +Obsoletes: sensorframework + +%description +Sensor Framework provides an interface to hardware sensor drivers through logical sensors. This package contains sensor framework daemon and required libraries. + + +%package devel +Summary: Sensor framework daemon libraries development headers +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: qt-devel + +%description devel +Development headers for sensor framework daemon and libraries. + + +%package tests +Summary: Unit test cases for sensord +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: testrunner-lite +Requires: python + +%description tests +Contains unit test cases for CI environment. + + +%package contextfw-tests +Summary: Test cases for sensord acting as context provider +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: sensorfw-tests +Requires: contextkit >= 0.3.6 + +%description contextfw-tests +Contains test cases for CI environment, for ensuring that sensord provides context properties correctly. + + +%package configs +Summary: Sensorfw configuration files +Group: System/Libraries +BuildArch: noarch +Requires: %{name} = %{version} +Provides: sensord-config +Provides: config-n900 +Provides: config-aava +Provides: config-icdk +Provides: config-ncdk +Provides: config-oemtablet +Provides: config-oaktraili +Provides: config-u8500 + +%description configs +Sensorfw configuration files. + + + +%prep +%setup -q -n %{name}-%{version} + +# >> setup +# << setup + +%build +unset LD_AS_NEEDED +# >> build pre +export LD_RUN_PATH=/usr/lib/sensord/ +# << build pre + +%qmake \ + CONFIG+=mce_disable + +make %{?jobs:-j%jobs} + +# >> build post +# << build post + +%install +rm -rf %{buildroot} +# >> install pre +# << install pre +%qmake_install + +# >> install post +install -D -m644 %{SOURCE2} $RPM_BUILD_ROOT/%{_lib}/systemd/system/sensord.service +install -D -m750 %{SOURCE3} $RPM_BUILD_ROOT/%{_bindir}/sensord-daemon-conf-setup + +mkdir -p %{buildroot}/%{_lib}/systemd/system/basic.target.wants +ln -s ../sensord.service %{buildroot}/%{_lib}/systemd/system/basic.target.wants/sensord.service +# << install post + + +%preun +if [ "$1" -eq 0 ]; then +systemctl stop sensord.service +fi + +%post +/sbin/ldconfig +systemctl daemon-reload +systemctl reload-or-try-restart sensord.service + +%postun +/sbin/ldconfig +systemctl daemon-reload + +%files +%defattr(-,root,root,-) +# >> files +%attr(755,root,root)%{_sbindir}/sensord +%{_libdir}/sensord/*.so +%{_libdir}/*.so.* +%config %{_sysconfdir}/dbus-1/system.d/sensorfw.conf +%config %{_sysconfdir}/sensorfw/sensord.conf +%dir %{_sysconfdir}/%{name}/sensord.conf.d/ +%{_datadir}/contextkit/providers/com.nokia.SensorService.context +%doc debian/copyright debian/README COPYING +/%{_lib}/systemd/system/sensord.service +/%{_lib}/systemd/system/basic.target.wants/sensord.service +%{_bindir}/sensord-daemon-conf-setup +# << files + +%files devel +%defattr(-,root,root,-) +# >> files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/* +%{_includedir}/sensord/* +%{_datadir}/qt4/mkspecs/features/sensord.prf +# From docs +#%attr(644,root,root)%{_defaultdocdir}/sensord/html/* +# << files devel + +%files tests +%defattr(-,root,root,-) +# >> files tests +%{_libdir}/sensord/testing/* +%attr(755,root,root)%{_datadir}/sensorfw-tests/*.p* +%attr(644,root,root)%{_datadir}/sensorfw-tests/*.xml +%attr(644,root,root)%{_datadir}/sensorfw-tests/*.conf +%attr(755,root,root)%{_bindir}/* +# << files tests + +%files contextfw-tests +%defattr(-,root,root,-) +# >> files contextfw-tests +%attr(755,root,root)%{_datadir}/sensorfw-contextfw-tests/*.sh +%attr(755,root,root)%{_datadir}/sensorfw-contextfw-tests/*.p* +%attr(644,root,root)%{_datadir}/sensorfw-contextfw-tests/*.xml +# << files contextfw-tests + +%files configs +%defattr(-,root,root,-) +# >> files configs +%config %{_sysconfdir}/%{name}/sensord.conf.d/*conf +%config %{_sysconfdir}/%{name}/*conf +%exclude %{_sysconfdir}/sensorfw/sensord.conf +# << files configs diff --git a/rpm/sensorfw-qt5.yaml b/rpm/sensorfw-qt5.yaml new file mode 100644 index 00000000..04a12248 --- /dev/null +++ b/rpm/sensorfw-qt5.yaml @@ -0,0 +1,89 @@ +Name: sensorfw-qt5 +Summary: Sensor Framework Qt5 +Version: 0.7.2.2 +Release: 0 +Group: "System/Sensor Framework" +License: LGPLv2+ +URL: http://gitorious.org/sensorfw +Description: | + Sensor Framework provides an interface to hardware sensor drivers through logical sensors. This package contains sensor framework daemon and required libraries. +Sources: + - "%{name}-%{version}.tar.bz2" + - "sensorfw-rpmlintrc" + - "sensord.service" + - "sensord-daemon-conf-setup" +Requires: + - qt + - GConf-dbus + - "%{name}-configs" + +PkgConfigBR: + - QtCore + - gconf-2.0 + - contextprovider-1.0 + +#PkgBR: +# - doxygen +# - graphviz + +Obsoletes: + - sensorframework + +Configure: none +Builder: qmake +UseAsNeeded: no + +QMakeOptions: + - "CONFIG+=mce_disable" + +SubPackages: + - Name: devel + Group: Development/Libraries + Requires: + - qt-devel + Summary: Sensor framework daemon libraries development headers + Description: | + Development headers for sensor framework daemon and libraries. + + - Name: tests + Group: Development/Libraries + Requires: + - testrunner-lite + - python + Summary: Unit test cases for sensord + Description: | + Contains unit test cases for CI environment. + + - Name: contextfw-tests + Group: Development/Libraries + Requires: + - sensorfw-tests + - contextkit >= 0.3.6 + Summary: Test cases for sensord acting as context provider + Description: | + Contains test cases for CI environment, for ensuring that sensord provides context properties correctly. + +# - Name: doc +# Group: Documentation +# Summary: API documentation for libsensord +# Description: | +# Doxygen-generated API documentation for sensord. + + - Name: configs + Group: System/Libraries + Summary: Sensorfw configuration files + Description: | + Sensorfw configuration files. + BuildArch: noarch + AutoDepend: no + Requires: + - "%{name} = %{version}" + Provides: + - sensord-config + - config-n900 + - config-aava + - config-icdk + - config-ncdk + - config-oemtablet + - config-oaktraili + - config-u8500 diff --git a/rpm/sensorfw-rpmlintrc b/rpm/sensorfw-rpmlintrc new file mode 100644 index 00000000..bcfcfaeb --- /dev/null +++ b/rpm/sensorfw-rpmlintrc @@ -0,0 +1,2 @@ +addFilter("sensorfw-doc.* file-contains-date-and-time") +addFilter("sensorfw-doc.* file-contains-current-date") diff --git a/rpm/sensorfw.changes b/rpm/sensorfw.changes new file mode 100644 index 00000000..f13c15a5 --- /dev/null +++ b/rpm/sensorfw.changes @@ -0,0 +1,188 @@ +* Tue Feb 12 2013 Lorn Potter - 0.7.2 +- added standbyOverride to steaccel. + +* Sat Feb 9 2013 Lorn Potter - 0.7.2 +- add patches from obs repo into tarball + +* Sun Jan 6 2013 Lorn Potter - 0.7.2 +- Add ste accelerometer adaptor + +* Wed Dec 14 2011 Carsten Munk - 0.7.2 +- Add sensorfw-0.7.2-dep-on-gobject.patch to build with new toolchain + +* Wed Nov 09 2011 Vesa-Matti Hartikainen - 0.7.2 +- Added patch sensorfw-0.7.3-RX51-axis-configuration.patch by + Timo Rongas from meego to align orientations on N900 to N950. + +* Thu Sep 29 2011 Marko Saukko - 0.7.2 +- Removed documentation. + +* Tue Aug 30 2011 Timo Rongas - 0.7.2 +- Added patch sensorfw-0.7.3-socket-location.patch to place + service socket into better location (/tmp/ gets wiped every + now and then). + +* Wed Aug 24 2011 Timo Rongas - 0.7.2 +- Added patch sensorfw-0.7.3-fix-acc-interval-evalution.patch (BMC#20777) + Same fix has been applied to upstream master (sensord-0.7.3). + +* Thu Jun 16 2011 Markus Lehtonen - 0.7.2 +- Version bump to 0.7.2 (BMC#12866) +- Remove the hackish sensord-rx_51.modules file +- add rpmlintrc + +* Wed Jun 08 2011 Chris Ferron - 0.6.36 +- removed Requires for sysklogd as sys log is provided without sysklogd. + +* Wed Jun 08 2011 Markus Lehtonen - 0.6.36 +- Remove dependencies to MCE (that is deprecated) +- Sync yaml with spec (the systemd changes) + +* Wed Jun 01 2011 Chris Ferron - 0.6.36 +- FEA#16109 - [FEA] Implement SystemD as MeeGo init provide +- Updated the sensorfw package to be usable by systemd as needed + to implement systemd as the init provider of MeeGo. For this + a systemd sensord.service file was added and installed, + along with a preexec script to set the correct conf file. + This will allow systemd to start stop and track the service. + +* Thu Apr 28 2011 Peter J Zhu - 0.6.36 +- sensorfw should rely on sensorfw-configs to work, which is indispensable parts to run senforfw + +* Fri Apr 15 2011 Forrest Zhao - 0.6.36 +- BMC#7594, fix the bug that orientation is off by 180 degree after + libqtsensors_meego.so is restored + +* Thu Mar 31 2011 Markus Lehtonen - 0.6.36 +- Added sensord-rx_51.modules file to load required kernel modules before + sensord starts on N900. Required to fix BMC#11699. + +* Fri Mar 25 2011 Forrest Zhao -0.6.36 +- BMC#3680, add adaptor for OEM tablet magnetometer sensor + +* Mon Mar 21 2011 Andy Ross - 0.6.36 +- Disable pegatron configuration, it conflicts with sensorfw-pegatron package. + +* Fri Mar 18 2011 Markus Lehtonen - 0.6.36 +- Remove SysV init script (fix BMC#12898) +- Fix dependencies of configs subpackage to solve dep problems in image + creation + +* Thu Mar 03 2011 Markus Lehtonen - 0.6.36 +- Fix icdk ALS configuration (BMC#11699). Fix from Catalin Popescu + +- Separate configuration packages removed. Automatic board detection removing + the need for this (needed to fix BMC#11698, BMC#1169). + +* Wed Mar 02 2011 Markus Lehtonen - 0.6.36 +- Remove preun/post/postun scriptlets to avoid double startup (BMC#12898). + +* Thu Feb 22 2011 Forrest Zhao - 0.6.36 +- Add adaptor for OEM tablet gyroscope sensor + +* Thu Feb 17 2011 Forrest Zhao - 0.6.36 +- Add adaptor for OEM tablet ALS sensor + +* Thu Feb 17 2011 Liang Huang - 0.6.36 +- Add oaktrail patch back removed by mistake + +* Wed Feb 16 2011 Forrest Zhao - 0.6.36 +- Fix BMC#4545 from sensorfw side + +* Wed Feb 16 2011 Liang Huang - 0.6.36 +- Add adaptor for Oaktrail accelerometer sensor + +* Sat Jan 30 2011 Forrest Zhao - 0.6.36 +- Add adaptor for PEGATRON accelerometer sensor +- Add adaptor for OEM tablet accelerometer sensor + +* Tue Jan 25 2011 Markus Lehtonen - 0.6.36 +- Version bump to 0.6.36 (BMC#12866) +- Enable MCE support + +* Mon Jan 03 2011 Markus Lehtonen - 0.6.32 +- Updated ncdk conf to fix screen rotation (refs BMC#8743, BMC#10385) +- Updated packaging: minor yaml/spec changes in %build and %install + +* Thu Dec 30 2010 Tapio Rantala - 0.6.32 +- Fix mce tools package name. This one more fix related to BMC#11352, also + required to fix BMC#9662 (when mce-tools becomes available in Trunk) + +* Fri Dec 17 2010 Markus Lehtonen - 0.6.32 +- Version bump, fixes BMC#11349 +- Adds gyro support (enabler for FEA BMC#6950) + +* Thu Dec 16 2010 Markus Lehtonen - 0.6.28_2 +- Add sensorfw-config-icdk package. Sensorfw fix to BMC#10385 for icdk. +- Remove unused (and virtually empty) sensorfw-config-cdk package + +* Wed Dec 15 2010 Tapio Rantala - 0.6.28_2 +- Split tests package +- Use correct directories for tests, add tests-directories.patch +- Fixes BMC#11352 + +* Wed Nov 29 2010 Markus Lehtonen - 0.6.28_2 +- Change RPM group tag according to MeeGo domain/subsystem + +* Fri Nov 05 2010 Shane Bryan - 0.6.28_2 +- Change the acc_trans_matrix for ncdk device back to the identity matrix. + The current, inversion, matrix is resulting in upsidedown rendering in + MTF based applications. Sensorfw part of fix to BMC#10385. + +* Wed Oct 27 2010 Markus Lehtonen - 0.6.28_2 +- Version bump +- Fixed config file path in config packages +- Add config package for nCDK + +* Wed Oct 20 2010 Markus Lehtonen - 0.6.28_1 +- Version bump: new alsadaptor-ascii, bug fixes + +* Thu Oct 07 2010 Markus Lehtonen - 0.6.26.p.gitde0cd945 +- Version bump to git head (multiconf patch now in upstream) + +* Thu Sep 30 2010 Markus Lehtonen - sensorfw-0.6.26.p.git45616cdb +- Version bump to git HEAD (adds e.g. adaptors for some new Intel platforms) +- Added device-specific config packages (should be temporary solution, until + device detection is implemented and working) + +* Wed Sep 22 2010 Markus Lehtonen - 0.6.25 +- Version bump to 0.6.25 +- Introduce multiconf patch + +* Tue Aug 24 2010 Markus Lehtonen - 0.6.19.p.git82de2729 +- added 'unset LD_AS_NEEDED' to spec file to fix missing library deps in + binaries + +* Thu Aug 19 2010 Markus Lehtonen - 0.6.19.p.git82de2729 +- subpkg names fixed +- init script updated + +* Tue Aug 17 2010 Markus Lehtonen - 0.6.19.p.git82de2729 +- version bump to git head +- packaging now uses spectacle + +* Wed Jun 23 2010 Markus Lehtonen - 0.6.17.p.gitba97aa55 +- version bump to git head (0.6.17.p.gitba97aa55) + +* Fri Jun 11 2010 Kalle Lampila - 0.6.11.p.git88850dca +- Added status and restart to init script + +* Mon Jun 07 2010 Markus Lehtonen - 0.6.11.p.git88850dca +- now obsoletes sensorframework (sensorframework from Intel) + +* Thu Jun 03 2010 Markus Lehtonen - 0.6.11.p.git88850dca +- init script added + +* Tue Jun 01 2010 Markus Lehtonen - 0.6.11.p.git88850dca +- more packaging fixes + +* Mon May 31 2010 Markus Lehtonen - 0.6.11.p.git88850dca +- graphviz added as builddep +- unneccessary %post scripts of devel package removed + +* Sat May 29 2010 Markus Lehtonen - 0.6.11.p.git88850dca +- Version bump to git head +- Packaging fixes + +* Thu May 27 2010 Markus Lehtonen - 0.6.11.p.gite106ebb4 +- Initial packaging effort diff --git a/rpm/sensorfw.spec b/rpm/sensorfw.spec new file mode 100644 index 00000000..dc412b45 --- /dev/null +++ b/rpm/sensorfw.spec @@ -0,0 +1,191 @@ +# +# Do NOT Edit the Auto-generated Part! +# Generated by: spectacle version 0.25 +# + +Name: sensorfw + +# >> macros +# << macros + +Summary: Sensor Framework +Version: 0.7.2.2 +Release: 0 +Group: System/Sensor Framework +License: LGPLv2+ +URL: http://gitorious.org/sensorfw +Source0: %{name}-%{version}.tar.bz2 +Source1: sensorfw-rpmlintrc +Source2: sensord.service +Source3: sensord-daemon-conf-setup +Source100: sensorfw.yaml +Requires: qt +Requires: GConf-dbus +Requires: %{name}-configs +Requires: systemd +Requires(preun): systemd +Requires(post): /sbin/ldconfig +Requires(post): systemd +Requires(postun): /sbin/ldconfig +Requires(postun): systemd +BuildRequires: pkgconfig(QtCore) +BuildRequires: pkgconfig(gconf-2.0) +BuildRequires: pkgconfig(contextprovider-1.0) +Obsoletes: sensorframework + +%description +Sensor Framework provides an interface to hardware sensor drivers through logical sensors. This package contains sensor framework daemon and required libraries. + + +%package devel +Summary: Sensor framework daemon libraries development headers +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: qt-devel + +%description devel +Development headers for sensor framework daemon and libraries. + + +%package tests +Summary: Unit test cases for sensord +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: testrunner-lite +Requires: python + +%description tests +Contains unit test cases for CI environment. + + +%package contextfw-tests +Summary: Test cases for sensord acting as context provider +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: sensorfw-tests +Requires: contextkit >= 0.3.6 + +%description contextfw-tests +Contains test cases for CI environment, for ensuring that sensord provides context properties correctly. + + +%package configs +Summary: Sensorfw configuration files +Group: System/Libraries +BuildArch: noarch +Requires: %{name} = %{version} +Provides: sensord-config +Provides: config-n900 +Provides: config-aava +Provides: config-icdk +Provides: config-ncdk +Provides: config-oemtablet +Provides: config-oaktraili +Provides: config-u8500 + +%description configs +Sensorfw configuration files. + + + +%prep +%setup -q -n %{name}-%{version} + +# >> setup +# << setup + +%build +unset LD_AS_NEEDED +# >> build pre +export LD_RUN_PATH=/usr/lib/sensord/ +# << build pre + +%qmake \ + CONFIG+=mce_disable + +make %{?jobs:-j%jobs} + +# >> build post +# << build post + +%install +rm -rf %{buildroot} +# >> install pre +# << install pre +%qmake_install + +# >> install post +install -D -m644 %{SOURCE2} $RPM_BUILD_ROOT/%{_lib}/systemd/system/sensord.service +install -D -m750 %{SOURCE3} $RPM_BUILD_ROOT/%{_bindir}/sensord-daemon-conf-setup + +mkdir -p %{buildroot}/%{_lib}/systemd/system/basic.target.wants +ln -s ../sensord.service %{buildroot}/%{_lib}/systemd/system/basic.target.wants/sensord.service +# << install post + + +%preun +if [ "$1" -eq 0 ]; then +systemctl stop sensord.service +fi + +%post +/sbin/ldconfig +systemctl daemon-reload +systemctl reload-or-try-restart sensord.service + +%postun +/sbin/ldconfig +systemctl daemon-reload + +%files +%defattr(-,root,root,-) +# >> files +%attr(755,root,root)%{_sbindir}/sensord +%{_libdir}/sensord/*.so +%{_libdir}/*.so.* +%config %{_sysconfdir}/dbus-1/system.d/sensorfw.conf +%config %{_sysconfdir}/sensorfw/sensord.conf +%dir %{_sysconfdir}/%{name}/sensord.conf.d/ +%{_datadir}/contextkit/providers/com.nokia.SensorService.context +%doc debian/copyright debian/README COPYING +/%{_lib}/systemd/system/sensord.service +/%{_lib}/systemd/system/basic.target.wants/sensord.service +%{_bindir}/sensord-daemon-conf-setup +# << files + +%files devel +%defattr(-,root,root,-) +# >> files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/* +%{_includedir}/sensord/* +%{_datadir}/qt4/mkspecs/features/sensord.prf +# From docs +#%attr(644,root,root)%{_defaultdocdir}/sensord/html/* +# << files devel + +%files tests +%defattr(-,root,root,-) +# >> files tests +%{_libdir}/sensord/testing/* +%attr(755,root,root)%{_datadir}/sensorfw-tests/*.p* +%attr(644,root,root)%{_datadir}/sensorfw-tests/*.xml +%attr(644,root,root)%{_datadir}/sensorfw-tests/*.conf +%attr(755,root,root)%{_bindir}/* +# << files tests + +%files contextfw-tests +%defattr(-,root,root,-) +# >> files contextfw-tests +%attr(755,root,root)%{_datadir}/sensorfw-contextfw-tests/*.sh +%attr(755,root,root)%{_datadir}/sensorfw-contextfw-tests/*.p* +%attr(644,root,root)%{_datadir}/sensorfw-contextfw-tests/*.xml +# << files contextfw-tests + +%files configs +%defattr(-,root,root,-) +# >> files configs +%config %{_sysconfdir}/%{name}/sensord.conf.d/*conf +%config %{_sysconfdir}/%{name}/*conf +%exclude %{_sysconfdir}/sensorfw/sensord.conf +# << files configs diff --git a/rpm/sensorfw.yaml b/rpm/sensorfw.yaml new file mode 100644 index 00000000..6b7a0b80 --- /dev/null +++ b/rpm/sensorfw.yaml @@ -0,0 +1,89 @@ +Name: sensorfw +Summary: Sensor Framework +Version: 0.7.2.2 +Release: 0 +Group: "System/Sensor Framework" +License: LGPLv2+ +URL: http://gitorious.org/sensorfw +Description: | + Sensor Framework provides an interface to hardware sensor drivers through logical sensors. This package contains sensor framework daemon and required libraries. +Sources: + - "%{name}-%{version}.tar.bz2" + - "sensorfw-rpmlintrc" + - "sensord.service" + - "sensord-daemon-conf-setup" +Requires: + - qt + - GConf-dbus + - "%{name}-configs" + +PkgConfigBR: + - QtCore + - gconf-2.0 + - contextprovider-1.0 + +#PkgBR: +# - doxygen +# - graphviz + +Obsoletes: + - sensorframework + +Configure: none +Builder: qmake +UseAsNeeded: no + +QMakeOptions: + - "CONFIG+=mce_disable" + +SubPackages: + - Name: devel + Group: Development/Libraries + Requires: + - qt-devel + Summary: Sensor framework daemon libraries development headers + Description: | + Development headers for sensor framework daemon and libraries. + + - Name: tests + Group: Development/Libraries + Requires: + - testrunner-lite + - python + Summary: Unit test cases for sensord + Description: | + Contains unit test cases for CI environment. + + - Name: contextfw-tests + Group: Development/Libraries + Requires: + - sensorfw-tests + - contextkit >= 0.3.6 + Summary: Test cases for sensord acting as context provider + Description: | + Contains test cases for CI environment, for ensuring that sensord provides context properties correctly. + +# - Name: doc +# Group: Documentation +# Summary: API documentation for libsensord +# Description: | +# Doxygen-generated API documentation for sensord. + + - Name: configs + Group: System/Libraries + Summary: Sensorfw configuration files + Description: | + Sensorfw configuration files. + BuildArch: noarch + AutoDepend: no + Requires: + - "%{name} = %{version}" + Provides: + - sensord-config + - config-n900 + - config-aava + - config-icdk + - config-ncdk + - config-oemtablet + - config-oaktraili + - config-u8500 diff --git a/sensors/accelerometersensor/accelerometerplugin.cpp b/sensors/accelerometersensor/accelerometerplugin.cpp index 041ca047..0fe896a2 100644 --- a/sensors/accelerometersensor/accelerometerplugin.cpp +++ b/sensors/accelerometersensor/accelerometerplugin.cpp @@ -40,4 +40,6 @@ QStringList AccelerometerPlugin::Dependencies() { return QString("accelerometerchain").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(accelerometersensor, AccelerometerPlugin) +#endif diff --git a/sensors/accelerometersensor/accelerometerplugin.h b/sensors/accelerometersensor/accelerometerplugin.h index 58a55dce..c82ff395 100644 --- a/sensors/accelerometersensor/accelerometerplugin.h +++ b/sensors/accelerometersensor/accelerometerplugin.h @@ -30,6 +30,10 @@ class AccelerometerPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif + private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/sensors/accelerometersensor/plugin.json b/sensors/accelerometersensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/accelerometersensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/alssensor/alsplugin.cpp b/sensors/alssensor/alsplugin.cpp index 72e1661e..b51a0b7a 100644 --- a/sensors/alssensor/alsplugin.cpp +++ b/sensors/alssensor/alsplugin.cpp @@ -46,4 +46,6 @@ QStringList ALSPlugin::Dependencies() { return QString("alsadaptor").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(alssensor, ALSPlugin) +#endif diff --git a/sensors/alssensor/alsplugin.h b/sensors/alssensor/alsplugin.h index e4f075d3..87f95e94 100644 --- a/sensors/alssensor/alsplugin.h +++ b/sensors/alssensor/alsplugin.h @@ -30,6 +30,9 @@ class ALSPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); void Init(class Loader& l); diff --git a/sensors/alssensor/plugin.json b/sensors/alssensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/alssensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/compasssensor/compassplugin.cpp b/sensors/compasssensor/compassplugin.cpp index 1dc0b1d4..16cee06e 100644 --- a/sensors/compasssensor/compassplugin.cpp +++ b/sensors/compasssensor/compassplugin.cpp @@ -40,4 +40,6 @@ QStringList CompassPlugin::Dependencies() { return QString("compasschain").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(compasssensor, CompassPlugin) +#endif diff --git a/sensors/compasssensor/compassplugin.h b/sensors/compasssensor/compassplugin.h index 0a65fe9c..d258b1ac 100644 --- a/sensors/compasssensor/compassplugin.h +++ b/sensors/compasssensor/compassplugin.h @@ -30,6 +30,9 @@ class CompassPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/sensors/compasssensor/plugin.json b/sensors/compasssensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/compasssensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/contextplugin/contextplugin.cpp b/sensors/contextplugin/contextplugin.cpp index 15e10f9a..d0b1bc6f 100644 --- a/sensors/contextplugin/contextplugin.cpp +++ b/sensors/contextplugin/contextplugin.cpp @@ -51,4 +51,6 @@ int ContextPlugin::getSessionId() return sessionId; } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(contextsensor, ContextPlugin) +#endif diff --git a/sensors/contextplugin/contextplugin.h b/sensors/contextplugin/contextplugin.h index beb6b5bd..6434e0ab 100644 --- a/sensors/contextplugin/contextplugin.h +++ b/sensors/contextplugin/contextplugin.h @@ -29,6 +29,9 @@ class ContextPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif public: static int getSessionId(); diff --git a/sensors/contextplugin/plugin.json b/sensors/contextplugin/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/contextplugin/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/gyroscopesensor/gyroscopeplugin.cpp b/sensors/gyroscopesensor/gyroscopeplugin.cpp index 73264606..8b7f37fd 100644 --- a/sensors/gyroscopesensor/gyroscopeplugin.cpp +++ b/sensors/gyroscopesensor/gyroscopeplugin.cpp @@ -40,4 +40,6 @@ QStringList GyroscopePlugin::Dependencies() { return QString("gyroscopeadaptor").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(gyroscopesensor, GyroscopePlugin) +#endif diff --git a/sensors/gyroscopesensor/gyroscopeplugin.h b/sensors/gyroscopesensor/gyroscopeplugin.h index 5e0d64da..b947378c 100644 --- a/sensors/gyroscopesensor/gyroscopeplugin.h +++ b/sensors/gyroscopesensor/gyroscopeplugin.h @@ -31,6 +31,9 @@ class GyroscopePlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/sensors/gyroscopesensor/plugin.json b/sensors/gyroscopesensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/gyroscopesensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/magnetometersensor/magnetometerplugin.cpp b/sensors/magnetometersensor/magnetometerplugin.cpp index 0362e609..449f3eb4 100644 --- a/sensors/magnetometersensor/magnetometerplugin.cpp +++ b/sensors/magnetometersensor/magnetometerplugin.cpp @@ -40,4 +40,6 @@ QStringList MagnetometerPlugin::Dependencies() { return QString("compasschain").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(magnetometersensor, MagnetometerPlugin) +#endif diff --git a/sensors/magnetometersensor/magnetometerplugin.h b/sensors/magnetometersensor/magnetometerplugin.h index 37a867a1..2f5d8bab 100644 --- a/sensors/magnetometersensor/magnetometerplugin.h +++ b/sensors/magnetometersensor/magnetometerplugin.h @@ -30,6 +30,9 @@ class MagnetometerPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/sensors/magnetometersensor/plugin.json b/sensors/magnetometersensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/magnetometersensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/orientationsensor/orientationplugin.cpp b/sensors/orientationsensor/orientationplugin.cpp index fa69d34c..ac1d8a12 100644 --- a/sensors/orientationsensor/orientationplugin.cpp +++ b/sensors/orientationsensor/orientationplugin.cpp @@ -40,4 +40,6 @@ QStringList OrientationPlugin::Dependencies() { return QString("orientationchain").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(orientationsensor, OrientationPlugin) +#endif diff --git a/sensors/orientationsensor/orientationplugin.h b/sensors/orientationsensor/orientationplugin.h index 78eaf6bb..342bfa0e 100644 --- a/sensors/orientationsensor/orientationplugin.h +++ b/sensors/orientationsensor/orientationplugin.h @@ -30,6 +30,9 @@ class OrientationPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/sensors/orientationsensor/plugin.json b/sensors/orientationsensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/orientationsensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/proximitysensor/plugin.json b/sensors/proximitysensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/proximitysensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/proximitysensor/proximityplugin.cpp b/sensors/proximitysensor/proximityplugin.cpp index 882cf07a..5a379abd 100644 --- a/sensors/proximitysensor/proximityplugin.cpp +++ b/sensors/proximitysensor/proximityplugin.cpp @@ -39,4 +39,6 @@ QStringList ProximityPlugin::Dependencies() { return QString("proximityadaptor").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(proximitysensor, ProximityPlugin) +#endif diff --git a/sensors/proximitysensor/proximityplugin.h b/sensors/proximitysensor/proximityplugin.h index ae7c1bd4..9e2a76a6 100644 --- a/sensors/proximitysensor/proximityplugin.h +++ b/sensors/proximitysensor/proximityplugin.h @@ -30,6 +30,9 @@ class ProximityPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/sensors/rotationsensor/plugin.json b/sensors/rotationsensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/rotationsensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/rotationsensor/rotationplugin.cpp b/sensors/rotationsensor/rotationplugin.cpp index 21c8a1ae..02f1ccfe 100644 --- a/sensors/rotationsensor/rotationplugin.cpp +++ b/sensors/rotationsensor/rotationplugin.cpp @@ -39,4 +39,6 @@ QStringList RotationPlugin::Dependencies() { return QString("accelerometerchain:rotationfilter").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(rotationsensor, RotationPlugin) +#endif diff --git a/sensors/rotationsensor/rotationplugin.h b/sensors/rotationsensor/rotationplugin.h index a6cd6d93..25d8165f 100644 --- a/sensors/rotationsensor/rotationplugin.h +++ b/sensors/rotationsensor/rotationplugin.h @@ -30,6 +30,9 @@ class RotationPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/sensors/tapsensor/plugin.json b/sensors/tapsensor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/sensors/tapsensor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/sensors/tapsensor/tapplugin.cpp b/sensors/tapsensor/tapplugin.cpp index 9d4ccf19..5cc74f1b 100644 --- a/sensors/tapsensor/tapplugin.cpp +++ b/sensors/tapsensor/tapplugin.cpp @@ -40,4 +40,6 @@ QStringList TapPlugin::Dependencies() { return QString("tapadaptor").split(":", QString::SkipEmptyParts); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(tapsensor, TapPlugin) +#endif diff --git a/sensors/tapsensor/tapplugin.h b/sensors/tapsensor/tapplugin.h index 93157134..a90e8f39 100644 --- a/sensors/tapsensor/tapplugin.h +++ b/sensors/tapsensor/tapplugin.h @@ -30,6 +30,9 @@ class TapPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); QStringList Dependencies(); diff --git a/tests/benchmark/fakeadaptor/fakeadaptorplugin.cpp b/tests/benchmark/fakeadaptor/fakeadaptorplugin.cpp index eac20a8a..f29c390b 100644 --- a/tests/benchmark/fakeadaptor/fakeadaptorplugin.cpp +++ b/tests/benchmark/fakeadaptor/fakeadaptorplugin.cpp @@ -35,4 +35,6 @@ void FakeAdaptorPlugin::Register(class Loader&) sm.registerDeviceAdaptor("alsadaptor"); } +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) Q_EXPORT_PLUGIN2(alsadaptor, FakeAdaptorPlugin) +#endif diff --git a/tests/benchmark/fakeadaptor/fakeadaptorplugin.h b/tests/benchmark/fakeadaptor/fakeadaptorplugin.h index a8985ae4..ac3ac3b0 100644 --- a/tests/benchmark/fakeadaptor/fakeadaptorplugin.h +++ b/tests/benchmark/fakeadaptor/fakeadaptorplugin.h @@ -30,6 +30,9 @@ class FakeAdaptorPlugin : public Plugin { +#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0) + Q_PLUGIN_METADATA(IID "com.nokia.SensorService.Plugin/1.0" FILE "plugin.json") +#endif private: void Register(class Loader& l); }; diff --git a/tests/benchmark/fakeadaptor/plugin.json b/tests/benchmark/fakeadaptor/plugin.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/tests/benchmark/fakeadaptor/plugin.json @@ -0,0 +1 @@ +{} diff --git a/tests/client/clientapitest.cpp b/tests/client/clientapitest.cpp index e2fb1b37..eefa061e 100644 --- a/tests/client/clientapitest.cpp +++ b/tests/client/clientapitest.cpp @@ -519,7 +519,7 @@ void ClientApiTest::testBuffering() { AbstractSensorChannelInterface* sensor = getSensor(sensorName); QScopedPointer sensorTmp(sensor); - QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); + QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); TestClient client(*sensor, true); int bufferSize = 10; int interval = 100; @@ -562,7 +562,7 @@ void ClientApiTest::testBufferingAllIntervalRanges() { AbstractSensorChannelInterface* sensor = getSensor(sensorName); QScopedPointer sensorTmp(sensor); - QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); + QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); TestClient client(*sensor, true); int bufferSize = 100; @@ -620,7 +620,7 @@ void ClientApiTest::testBufferingCompatibility() { AbstractSensorChannelInterface* sensor = getSensor(sensorName); QScopedPointer sensorTmp(sensor); - QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); + QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); TestClient client(*sensor, false); int interval = 100; int bufferSize = 10; @@ -666,7 +666,7 @@ void ClientApiTest::testBufferingInterval() { AbstractSensorChannelInterface* sensor = getSensor(sensorName); QScopedPointer sensorTmp(sensor); - QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); + QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); TestClient client(*sensor, true); int interval = 100; sensor->setInterval(interval); @@ -731,7 +731,7 @@ void ClientApiTest::testAvailableBufferIntervals() { AbstractSensorChannelInterface* sensor = getSensor(sensorName); QScopedPointer sensorTmp(sensor); - QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); + QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); IntegerRangeList rangeList = sensor->getAvailableBufferIntervals(); QVERIFY(rangeList.size() == 1); @@ -748,7 +748,7 @@ void ClientApiTest::testAvailableBufferSizes() { AbstractSensorChannelInterface* sensor = getSensor(sensorName); QScopedPointer sensorTmp(sensor); - QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); + QVERIFY2(sensor && sensor->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); IntegerRangeList rangeList = sensor->getAvailableBufferSizes(); QVERIFY(rangeList.size() == 1); QVERIFY(rangeList.front().first == 1); @@ -766,8 +766,8 @@ void ClientApiTest::testDownsampling() AbstractSensorChannelInterface* sensor2 = getSensor(sensorName); QScopedPointer sensorTmp1(sensor1); QScopedPointer sensorTmp2(sensor2); - QVERIFY2(sensor1 && sensor1->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); - QVERIFY2(sensor2 && sensor2->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); + QVERIFY2(sensor1 && sensor1->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); + QVERIFY2(sensor2 && sensor2->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); SampleCollector client1(*sensor1, true); int interval = 100; @@ -841,8 +841,8 @@ void ClientApiTest::testDownsamplingDisabled() QScopedPointer sensorTmp1(sensor1); QScopedPointer sensorTmp2(sensor2); - QVERIFY2(sensor1 && sensor1->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); - QVERIFY2(sensor2 && sensor2->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toAscii()); + QVERIFY2(sensor1 && sensor1->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); + QVERIFY2(sensor2 && sensor2->isValid(),QString("Could not get %1 sensor channel").arg(sensorName).toLatin1()); SampleCollector client1(*sensor1, true); int interval = 100; diff --git a/tests/client/clientapitest.h b/tests/client/clientapitest.h index 8e1eb96b..8079d70a 100644 --- a/tests/client/clientapitest.h +++ b/tests/client/clientapitest.h @@ -143,7 +143,7 @@ QByteArray ClientApiTest::errorMessage(const QString& sensorName, int interval, { QString errMsg(QString("Buffering err %1 (%2 Hz): ").arg(sensorName).arg(QString::number(1000 / interval))); errMsg.append(QString("%1 %2 %3").arg(QString::number(value)).arg(compOperator).arg(QString::number(limit))); - return errMsg.toAscii(); + return errMsg.toLatin1(); } #endif // CLIENT_API_TEST_H diff --git a/tests/metadata/metadatatest.cpp b/tests/metadata/metadatatest.cpp index 26b05cc7..0381d98c 100644 --- a/tests/metadata/metadatatest.cpp +++ b/tests/metadata/metadatatest.cpp @@ -294,7 +294,7 @@ void MetaDataTest::printMetaData() sensor = sensorList.takeFirst(); if (sensor != NULL) { - qDebug() << " Description :" << sensor->description().toAscii().data(); + qDebug() << " Description :" << sensor->description().toLatin1().data(); qDebug() << " Interval :" << sensor->interval(); qDebug() << " Possible rates :"; @@ -307,32 +307,32 @@ void MetaDataTest::printMetaData() DataRange r = rateList.at(i-1); if (r.min == r.max) { - qDebug() << QString(" %1. %2").arg(i).arg(r.min).toAscii().data(); + qDebug() << QString(" %1. %2").arg(i).arg(r.min).toLatin1().data(); } else { - qDebug() << QString(" %1. [%2, %3]").arg(i).arg(r.min).arg(r.max).toAscii().data(); + qDebug() << QString(" %1. [%2, %3]").arg(i).arg(r.min).arg(r.max).toLatin1().data(); } // min sensor->setInterval(r.min); - QVERIFY2(r.min==sensor->interval(),msg.append(QString::number(r.min)).toAscii()); + QVERIFY2(r.min==sensor->interval(),msg.append(QString::number(r.min)).toLatin1()); // max sensor->setInterval(r.max); - QVERIFY2(r.max==sensor->interval(),msg.append(QString::number(r.max)).toAscii()); + QVERIFY2(r.max==sensor->interval(),msg.append(QString::number(r.max)).toLatin1()); // average int value = (r.min+r.max)*0.5; sensor->setInterval(value); - QVERIFY2(value==sensor->interval(),msg.append(QString::number(value)).toAscii()); + QVERIFY2(value==sensor->interval(),msg.append(QString::number(value)).toLatin1()); } DataRange r = sensor->getCurrentDataRange(); - qDebug() << QString(" Data Range : [%1, %2], resolution %3").arg(r.min).arg(r.max).arg(r.resolution).toAscii().data(); + qDebug() << QString(" Data Range : [%1, %2], resolution %3").arg(r.min).arg(r.max).arg(r.resolution).toLatin1().data(); qDebug() << " Possible ranges:"; QList rangeList = sensor->getAvailableDataRanges(); for (int i = 1; i <= rangeList.size(); i++) { r = rangeList.at(i-1); - qDebug() << QString(" %1. [%2, %3], resolution %4").arg(i).arg(r.min).arg(r.max).arg(r.resolution).toAscii().data(); + qDebug() << QString(" %1. [%2, %3], resolution %4").arg(i).arg(r.min).arg(r.max).arg(r.resolution).toLatin1().data(); } delete sensor; diff --git a/tests/testutils/datafaker/datafaker.cpp b/tests/testutils/datafaker/datafaker.cpp index 98f3607a..1f8fd307 100644 --- a/tests/testutils/datafaker/datafaker.cpp +++ b/tests/testutils/datafaker/datafaker.cpp @@ -41,7 +41,7 @@ bool DataFaker::open(QString path, QString name) return false; } - int fd = ::open(path.toAscii().constData(), O_WRONLY); + int fd = ::open(path.toLatin1().constData(), O_WRONLY); if (fd < 0) { qDebug() << "[DataFaker]: Failed to open" << path; return false; diff --git a/tests/testutils/sensorfakeopen/sensorfakeopen.cpp b/tests/testutils/sensorfakeopen/sensorfakeopen.cpp index 598123ff..a2e370d2 100644 --- a/tests/testutils/sensorfakeopen/sensorfakeopen.cpp +++ b/tests/testutils/sensorfakeopen/sensorfakeopen.cpp @@ -63,13 +63,13 @@ int open(const char *pathname, int flags, mode_t mode) if (pathList.at(0) == QString(pathname)) { qDebug() << "[FAKEOPEN]: Opening" << pathList.at(1) << "instead of" << pathList.at(0); - int fd = real_open(pathList.at(1).toAscii().constData(), flags, mode); + int fd = real_open(pathList.at(1).toLatin1().constData(), flags, mode); if (fd >= 0) { const char* fakedFdsC = getenv("FAKEOPEN_FDS"); QString fakedFds(fakedFdsC); fakedFds.append(QString(":%1=%2").arg(fd).arg(pathList.at(2))); - if (setenv("FAKEOPEN_FDS", fakedFds.toAscii().constData(), 1)) { + if (setenv("FAKEOPEN_FDS", fakedFds.toLatin1().constData(), 1)) { qDebug() << "[FAKEOPEN]: Setting FAKEOPEN_FDS failed!"; } } else { @@ -121,7 +121,7 @@ int ioctl(int d, int request, ...) foreach (QString fakedFd, fakedFds) { if (fakedFd.split("=").at(0).toInt() == d) { qDebug() << "[FAKEOPEN]: Faking ioctl() call "; - sprintf(argp, "%s", fakedFd.split("=").at(1).toAscii().constData()); + sprintf(argp, "%s", fakedFd.split("=").at(1).toLatin1().constData()); return 0; } }