diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-11 14:15:55 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-11 14:15:56 +0200 |
commit | 37fd0ee78f6321cd381bf6a4262214a26a29cf11 (patch) | |
tree | d4ffaac197abafe3b411b8202514e3390b2aa906 /src | |
parent | 533f147b297d716f1f995054c925917bbb0f4bb9 (diff) | |
parent | e60743e095b8bb7fcc3f0de823d2a46aa68343d3 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Change-Id: I07a6842afc72f56c82e82906429fa422f9a82de2
Diffstat (limited to 'src')
22 files changed, 32 insertions, 18 deletions
diff --git a/src/plugins/sensorgestures/qtsensors/qtsensors.pro b/src/plugins/sensorgestures/qtsensors/qtsensors.pro index de6c2780..3f8df039 100644 --- a/src/plugins/sensorgestures/qtsensors/qtsensors.pro +++ b/src/plugins/sensorgestures/qtsensors/qtsensors.pro @@ -2,6 +2,8 @@ TARGET = qtsensorgestures_plugin QT = core sensors PLUGIN_TYPE = sensorgestures +PLUGIN_CLASS_NAME = QtSensorGesturePlugin +PLUGIN_EXTENDS = - load(qt_plugin) # Input diff --git a/src/plugins/sensorgestures/shake/shake.pro b/src/plugins/sensorgestures/shake/shake.pro index 82031c62..d7d8f92e 100644 --- a/src/plugins/sensorgestures/shake/shake.pro +++ b/src/plugins/sensorgestures/shake/shake.pro @@ -2,6 +2,8 @@ TARGET = qtsensorgestures_shakeplugin QT = core sensors PLUGIN_TYPE = sensorgestures +PLUGIN_CLASS_NAME = QShakeSensorGesturePlugin +PLUGIN_EXTENDS = - load(qt_plugin) # Input diff --git a/src/plugins/sensors/android/src/androidaccelerometer.cpp b/src/plugins/sensors/android/src/androidaccelerometer.cpp index 5a42d0cb..76aa0278 100644 --- a/src/plugins/sensors/android/src/androidaccelerometer.cpp +++ b/src/plugins/sensors/android/src/androidaccelerometer.cpp @@ -89,8 +89,8 @@ AndroidSensors::AndroidSensorType AndroidAccelerometer::modeToSensor(QAccelerome case QAccelerometer::User: type = AndroidSensors::TYPE_LINEAR_ACCELERATION; break; - default: case QAccelerometer::Combined: + default: type = AndroidSensors::TYPE_ACCELEROMETER; break; } diff --git a/src/plugins/sensors/android/src/main.cpp b/src/plugins/sensors/android/src/main.cpp index 3326208b..3d8604fe 100644 --- a/src/plugins/sensors/android/src/main.cpp +++ b/src/plugins/sensors/android/src/main.cpp @@ -112,10 +112,11 @@ public: { AndroidSensorType type = static_cast<AndroidSensorType>(sensor->identifier().toInt()); switch (type) { - case TYPE_ACCELEROMETER: - { + case TYPE_ACCELEROMETER: { QAccelerometer * const accelerometer = qobject_cast<QAccelerometer *>(sensor); - AndroidSensors::AndroidSensorType type = AndroidAccelerometer::modeToSensor(accelerometer->accelerationMode()); + AndroidSensors::AndroidSensorType type + = accelerometer ? AndroidAccelerometer::modeToSensor(accelerometer->accelerationMode()) + : AndroidSensors::TYPE_ACCELEROMETER; return new AndroidAccelerometer(type, sensor); } case TYPE_AMBIENT_TEMPERATURE: diff --git a/src/plugins/sensors/android/src/plugin.json b/src/plugins/sensors/android/src/plugin.json index 8a55b3ae..ef0cbb62 100644 --- a/src/plugins/sensors/android/src/plugin.json +++ b/src/plugins/sensors/android/src/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "android" ] } diff --git a/src/plugins/sensors/android/src/src.pro b/src/plugins/sensors/android/src/src.pro index a184aae7..21423efb 100644 --- a/src/plugins/sensors/android/src/src.pro +++ b/src/plugins/sensors/android/src/src.pro @@ -2,6 +2,7 @@ TARGET = qtsensors_android QT = sensors core PLUGIN_TYPE = sensors +PLUGIN_CLASS_NAME = QCounterGesturePlugin load(qt_plugin) # STATICPLUGIN needed because there's a Q_IMPORT_PLUGIN in main.cpp diff --git a/src/plugins/sensors/blackberry/blackberry.pro b/src/plugins/sensors/blackberry/blackberry.pro index b03d4028..2b0a9541 100644 --- a/src/plugins/sensors/blackberry/blackberry.pro +++ b/src/plugins/sensors/blackberry/blackberry.pro @@ -3,6 +3,7 @@ QT = sensors core DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII PLUGIN_TYPE = sensors +PLUGIN_CLASS_NAME = BbSensorPlugin load(qt_plugin) config_bbsensor_header { diff --git a/src/plugins/sensors/blackberry/plugin.json b/src/plugins/sensors/blackberry/plugin.json index 8a55b3ae..5350abb1 100644 --- a/src/plugins/sensors/blackberry/plugin.json +++ b/src/plugins/sensors/blackberry/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "blackberry" ] } diff --git a/src/plugins/sensors/dummy/dummy.pro b/src/plugins/sensors/dummy/dummy.pro index f54588af..93f54dc0 100644 --- a/src/plugins/sensors/dummy/dummy.pro +++ b/src/plugins/sensors/dummy/dummy.pro @@ -2,6 +2,7 @@ TARGET = qtsensors_dummy QT = sensors core PLUGIN_TYPE = sensors +PLUGIN_CLASS_NAME = dummySensorPlugin load(qt_plugin) HEADERS += dummycommon.h\ diff --git a/src/plugins/sensors/dummy/plugin.json b/src/plugins/sensors/dummy/plugin.json index 8a55b3ae..5485029b 100644 --- a/src/plugins/sensors/dummy/plugin.json +++ b/src/plugins/sensors/dummy/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "dummy" ] } diff --git a/src/plugins/sensors/generic/plugin.json b/src/plugins/sensors/generic/plugin.json index 8a55b3ae..d3e579e7 100644 --- a/src/plugins/sensors/generic/plugin.json +++ b/src/plugins/sensors/generic/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "generic" ] } diff --git a/src/plugins/sensors/ios/plugin.json b/src/plugins/sensors/ios/plugin.json index 8a55b3ae..c9f07668 100644 --- a/src/plugins/sensors/ios/plugin.json +++ b/src/plugins/sensors/ios/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "ios" ] } diff --git a/src/plugins/sensors/linux/linux.pro b/src/plugins/sensors/linux/linux.pro index 25c4f2d9..636bd1b3 100644 --- a/src/plugins/sensors/linux/linux.pro +++ b/src/plugins/sensors/linux/linux.pro @@ -2,6 +2,7 @@ TARGET = qtsensors_linuxsys QT = core sensors PLUGIN_TYPE = sensors +PLUGIN_CLASS_NAME = LinuxSensorPlugin load(qt_plugin) OTHER_FILES = plugin.json diff --git a/src/plugins/sensors/linux/plugin.json b/src/plugins/sensors/linux/plugin.json index 8a55b3ae..f3863f11 100644 --- a/src/plugins/sensors/linux/plugin.json +++ b/src/plugins/sensors/linux/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "linux" ] } diff --git a/src/plugins/sensors/sensorfw/plugin.json b/src/plugins/sensors/sensorfw/plugin.json index 8a55b3ae..a418c7dd 100644 --- a/src/plugins/sensors/sensorfw/plugin.json +++ b/src/plugins/sensors/sensorfw/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "sensorfw" ] } diff --git a/src/plugins/sensors/sensorfw/sensorfw.pro b/src/plugins/sensors/sensorfw/sensorfw.pro index f875f593..6c1408b2 100644 --- a/src/plugins/sensors/sensorfw/sensorfw.pro +++ b/src/plugins/sensors/sensorfw/sensorfw.pro @@ -2,6 +2,7 @@ TARGET = qtsensors_sensorfw QT = core sensors network dbus PLUGIN_TYPE = sensors +PLUGIN_CLASS_NAME = sensorfwSensorPlugin load(qt_plugin) include(sensorfw.pri) diff --git a/src/plugins/sensors/sensors.pro b/src/plugins/sensors/sensors.pro index a566716a..3f35db5a 100644 --- a/src/plugins/sensors/sensors.pro +++ b/src/plugins/sensors/sensors.pro @@ -1,7 +1,5 @@ TEMPLATE = subdirs -# Don't build dummy plugins, the Blackberry backend has real implementations -# of these. This reduces compile time and plugin loading time. blackberry { isEmpty(SENSORS_PLUGINS): SENSORS_PLUGINS = blackberry generic } @@ -22,9 +20,13 @@ winrt { isEmpty(SENSORS_PLUGINS): SENSORS_PLUGINS = winrt generic } +qtHaveModule(simulator) { + isEmpty(SENSORS_PLUGINS): SENSORS_PLUGINS = simulator generic +} + isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, dummy):SUBDIRS += dummy isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, generic):SUBDIRS += generic -isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, simulator):simulator:SUBDIRS += simulator +isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, simulator):qtHaveModule(simulator):SUBDIRS += simulator isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, blackberry):blackberry:SUBDIRS += blackberry isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, linux):linux:SUBDIRS += linux isEmpty(SENSORS_PLUGINS)|contains(SENSORS_PLUGINS, android):android:SUBDIRS += android diff --git a/src/plugins/sensors/simulator/plugin.json b/src/plugins/sensors/simulator/plugin.json index 8a55b3ae..77f47afe 100644 --- a/src/plugins/sensors/simulator/plugin.json +++ b/src/plugins/sensors/simulator/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "simulator" ] } diff --git a/src/plugins/sensors/simulator/simulator.pro b/src/plugins/sensors/simulator/simulator.pro index 2c1d933f..b110137b 100644 --- a/src/plugins/sensors/simulator/simulator.pro +++ b/src/plugins/sensors/simulator/simulator.pro @@ -1,6 +1,7 @@ TARGET = qtsensors_simulator PLUGIN_TYPE = sensors +PLUGIN_CLASS_NAME = SimulatorSensorPlugin load(qt_plugin) QT=core gui network sensors simulator diff --git a/src/plugins/sensors/winrt/plugin.json b/src/plugins/sensors/winrt/plugin.json index 8a55b3ae..0b1b6642 100644 --- a/src/plugins/sensors/winrt/plugin.json +++ b/src/plugins/sensors/winrt/plugin.json @@ -1 +1 @@ -{ "Keys": [ "notused" ] } +{ "Keys": [ "winrt" ] } diff --git a/src/plugins/sensors/winrt/winrt.pro b/src/plugins/sensors/winrt/winrt.pro index 494e1bf0..e9f3274f 100644 --- a/src/plugins/sensors/winrt/winrt.pro +++ b/src/plugins/sensors/winrt/winrt.pro @@ -2,6 +2,7 @@ TARGET = qtsensors_winrt QT = sensors core PLUGIN_TYPE = sensors +PLUGIN_CLASS_NAME = WinRtSensorPlugin load(qt_plugin) HEADERS += \ diff --git a/src/sensors/sensors.pro b/src/sensors/sensors.pro index 5ca3325a..a7f60e18 100644 --- a/src/sensors/sensors.pro +++ b/src/sensors/sensors.pro @@ -5,7 +5,7 @@ QT = core-private CONFIG(debug,debug|release):DEFINES += ENABLE_RUNTIME_SENSORLOG !isEmpty(SENSORS_CONFIG_PATH):DEFINES += "QTSENSORS_CONFIG_PATH=\\\"$$SENSORS_CONFIG_PATH\\\"" -simulator { +qtHaveModule(simulator) { DEFINES += SIMULATOR_BUILD QT += simulator } @@ -52,7 +52,7 @@ GESTURE_HEADERS += \ gestures/qsensorgesturemanagerprivate_p.h \ gestures/qsensorgestureplugininterface.h -simulator { +qtHaveModule(simulator) { SOURCES += gestures/simulatorgesturescommon.cpp GESTURE_HEADERS += gestures/simulatorgesturescommon_p.h } |