diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-25 13:41:06 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-25 13:41:11 +0100 |
commit | e3de1d31fe05455f1f22085bb3607047d8ba718d (patch) | |
tree | ef7ea9ac0cdab88d953af7796e52c22a0e49b4c5 /src | |
parent | 5809a8b0ec112ced99d34c9670d097f1f0dc3171 (diff) | |
parent | 97cf3d27e6e9771690b1ea29e09f06d4376ffcab (diff) | |
download | qtsensors-e3de1d31fe05455f1f22085bb3607047d8ba718d.tar.gz |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/plugins/sensors/generic/generictiltsensor.cpp
src/sensors/qtapsensor.h
sync.profile
Change-Id: I017a5fa8dffb69b41727495175c0fca9b76962e1
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/sensorgestures/qtsensors/qtwistsensorgesturerecognizer.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sensors/blackberry/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sensors/dummy/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sensors/generic/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sensors/linux/main.cpp | 2 | ||||
-rw-r--r-- | src/plugins/sensors/sensors.pro | 1 | ||||
-rw-r--r-- | src/plugins/sensors/simulator/main.cpp | 2 | ||||
-rw-r--r-- | src/sensors/doc/snippets/sensors/plugin.cpp | 2 | ||||
-rw-r--r-- | src/sensors/gestures/qsensorgesture.h | 2 | ||||
-rw-r--r-- | src/sensors/gestures/qsensorgestureplugininterface.h | 2 | ||||
-rw-r--r-- | src/sensors/qorientationsensor.h | 2 | ||||
-rw-r--r-- | src/sensors/qsensorbackend.h | 10 | ||||
-rw-r--r-- | src/sensors/qsensormanager.cpp | 2 | ||||
-rw-r--r-- | src/sensors/qsensorplugin.h | 4 | ||||
-rw-r--r-- | src/sensors/qtapsensor.h | 2 | ||||
-rw-r--r-- | src/src.pro | 2 |
16 files changed, 20 insertions, 21 deletions
diff --git a/src/plugins/sensorgestures/qtsensors/qtwistsensorgesturerecognizer.cpp b/src/plugins/sensorgestures/qtsensors/qtwistsensorgesturerecognizer.cpp index db0e900..074746e 100644 --- a/src/plugins/sensorgestures/qtsensors/qtwistsensorgesturerecognizer.cpp +++ b/src/plugins/sensorgestures/qtsensors/qtwistsensorgesturerecognizer.cpp @@ -160,7 +160,7 @@ void QTwistSensorGestureRecognizer::accelChanged(QAccelerometerReading *reading) qreal angle = qAtan(x / qSqrt(y*y + z*z)) * RADIANS_TO_DEGREES; if (qAbs(angle) > 2) { - if (detecting){ + if (detecting) { if ((angle > 0 && angle < lastAngle) || (angle < 0 && angle > lastAngle)) { decreaseCount++; diff --git a/src/plugins/sensors/blackberry/main.cpp b/src/plugins/sensors/blackberry/main.cpp index 9d8e87f..61f9aa0 100644 --- a/src/plugins/sensors/blackberry/main.cpp +++ b/src/plugins/sensors/blackberry/main.cpp @@ -79,7 +79,7 @@ static const char *bbTemperatureSensorId = "bbTemperatureSensor"; class BbSensorPlugin : public QObject, public QSensorPluginInterface, public QSensorBackendFactory { Q_OBJECT - Q_PLUGIN_METADATA(IID "com.nokia.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") + Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: diff --git a/src/plugins/sensors/dummy/main.cpp b/src/plugins/sensors/dummy/main.cpp index 7da65fe..89f07fc 100644 --- a/src/plugins/sensors/dummy/main.cpp +++ b/src/plugins/sensors/dummy/main.cpp @@ -50,7 +50,7 @@ class dummySensorPlugin : public QObject, public QSensorPluginInterface, public QSensorBackendFactory { Q_OBJECT - Q_PLUGIN_METADATA(IID "com.nokia.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") + Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: void registerSensors() diff --git a/src/plugins/sensors/generic/main.cpp b/src/plugins/sensors/generic/main.cpp index ed33f58..4b348b1 100644 --- a/src/plugins/sensors/generic/main.cpp +++ b/src/plugins/sensors/generic/main.cpp @@ -54,7 +54,7 @@ class genericSensorPlugin : public QObject, public QSensorPluginInterface, public QSensorChangesInterface, public QSensorBackendFactory { Q_OBJECT - Q_PLUGIN_METADATA(IID "com.nokia.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") + Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface QSensorChangesInterface) public: void registerSensors() diff --git a/src/plugins/sensors/linux/main.cpp b/src/plugins/sensors/linux/main.cpp index 9069880..7e9ece5 100644 --- a/src/plugins/sensors/linux/main.cpp +++ b/src/plugins/sensors/linux/main.cpp @@ -51,7 +51,7 @@ class LinuxSensorPlugin : public QObject, public QSensorPluginInterface, public QSensorBackendFactory { Q_OBJECT - Q_PLUGIN_METADATA(IID "com.nokia.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") + Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: void registerSensors() diff --git a/src/plugins/sensors/sensors.pro b/src/plugins/sensors/sensors.pro index 2edbb36..a8b59b0 100644 --- a/src/plugins/sensors/sensors.pro +++ b/src/plugins/sensors/sensors.pro @@ -5,7 +5,6 @@ TEMPLATE = subdirs blackberry { isEmpty(SENSORS_PLUGINS): SENSORS_PLUGINS = blackberry 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 diff --git a/src/plugins/sensors/simulator/main.cpp b/src/plugins/sensors/simulator/main.cpp index 1e40408..5e15568 100644 --- a/src/plugins/sensors/simulator/main.cpp +++ b/src/plugins/sensors/simulator/main.cpp @@ -53,7 +53,7 @@ class SimulatorSensorPlugin : public QObject, public QSensorPluginInterface, public QSensorBackendFactory { Q_OBJECT - Q_PLUGIN_METADATA(IID "com.nokia.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") + Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: SimulatorSensorPlugin() diff --git a/src/sensors/doc/snippets/sensors/plugin.cpp b/src/sensors/doc/snippets/sensors/plugin.cpp index e467128..cad6378 100644 --- a/src/sensors/doc/snippets/sensors/plugin.cpp +++ b/src/sensors/doc/snippets/sensors/plugin.cpp @@ -48,7 +48,7 @@ const char *MyBackend::id = "mybackend"; class MyPluginClass : public QObject, public QSensorPluginInterface, public QSensorBackendFactory { Q_OBJECT - //Q_PLUGIN_METADATA(IID "com.nokia.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") + //Q_PLUGIN_METADATA(IID "com.qt-project.Qt.QSensorPluginInterface/1.0" FILE "plugin.json") Q_INTERFACES(QSensorPluginInterface) public: void registerSensors() diff --git a/src/sensors/gestures/qsensorgesture.h b/src/sensors/gestures/qsensorgesture.h index 6c65120..5ae7bb2 100644 --- a/src/sensors/gestures/qsensorgesture.h +++ b/src/sensors/gestures/qsensorgesture.h @@ -44,7 +44,7 @@ #include <QObject> #include <QStringList> -#include <qsensorsglobal.h> +#include <QtSensors/qsensorsglobal.h> #include <QList> #include <QMap> diff --git a/src/sensors/gestures/qsensorgestureplugininterface.h b/src/sensors/gestures/qsensorgestureplugininterface.h index ad50eac..330d880 100644 --- a/src/sensors/gestures/qsensorgestureplugininterface.h +++ b/src/sensors/gestures/qsensorgestureplugininterface.h @@ -62,7 +62,7 @@ public: virtual QString name() const = 0; }; -Q_DECLARE_INTERFACE(QSensorGesturePluginInterface, "org.qt-project.QSensorGesturePluginInterface"); +Q_DECLARE_INTERFACE(QSensorGesturePluginInterface, "org.qt-project.QSensorGesturePluginInterface") QT_END_NAMESPACE diff --git a/src/sensors/qorientationsensor.h b/src/sensors/qorientationsensor.h index fa508f3..082598f 100644 --- a/src/sensors/qorientationsensor.h +++ b/src/sensors/qorientationsensor.h @@ -62,7 +62,7 @@ public: LeftUp, RightUp, FaceUp, - FaceDown, + FaceDown }; Orientation orientation() const; diff --git a/src/sensors/qsensorbackend.h b/src/sensors/qsensorbackend.h index feb05f0..4c6ce8b 100644 --- a/src/sensors/qsensorbackend.h +++ b/src/sensors/qsensorbackend.h @@ -66,12 +66,12 @@ public: void setDescription(const QString &description); template <typename T> - T *setReading(T *reading) + T *setReading(T *readingClass) { - if (!reading) - reading = new T(this); - setReadings(reading, new T(this), new T(this)); - return reading; + if (!readingClass) + readingClass = new T(this); + setReadings(readingClass, new T(this), new T(this)); + return readingClass; } QSensorReading *reading() const; diff --git a/src/sensors/qsensormanager.cpp b/src/sensors/qsensormanager.cpp index b1b2e78..dbaf1eb 100644 --- a/src/sensors/qsensormanager.cpp +++ b/src/sensors/qsensormanager.cpp @@ -68,7 +68,7 @@ public: QSensorManagerPrivate() : loadExternalPlugins(true) , pluginLoadingState(NotLoaded) - , loader(new QFactoryLoader("com.nokia.Qt.QSensorPluginInterface/1.0", QLatin1String("/sensors"))) + , loader(new QFactoryLoader("com.qt-project.Qt.QSensorPluginInterface/1.0", QLatin1String("/sensors"))) , defaultIdentifierForTypeLoaded(false) , sensorsChanged(false) { diff --git a/src/sensors/qsensorplugin.h b/src/sensors/qsensorplugin.h index 63f0ae2..336bce6 100644 --- a/src/sensors/qsensorplugin.h +++ b/src/sensors/qsensorplugin.h @@ -64,8 +64,8 @@ protected: ~QSensorChangesInterface() {} }; -Q_DECLARE_INTERFACE(QSensorPluginInterface, "com.nokia.Qt.QSensorPluginInterface/1.0"); -Q_DECLARE_INTERFACE(QSensorChangesInterface, "com.nokia.Qt.QSensorChangesInterface/5.0"); +Q_DECLARE_INTERFACE(QSensorPluginInterface, "com.qt-project.Qt.QSensorPluginInterface/1.0") +Q_DECLARE_INTERFACE(QSensorChangesInterface, "com.qt-project.Qt.QSensorChangesInterface/5.0") QT_END_NAMESPACE diff --git a/src/sensors/qtapsensor.h b/src/sensors/qtapsensor.h index f44609b..74ca40c 100644 --- a/src/sensors/qtapsensor.h +++ b/src/sensors/qtapsensor.h @@ -108,7 +108,7 @@ Q_SIGNALS: private: Q_DECLARE_PRIVATE(QTapSensor); - Q_DISABLE_COPY(QTapSensor); + Q_DISABLE_COPY(QTapSensor) }; QT_END_NAMESPACE diff --git a/src/src.pro b/src/src.pro index 4ea98a9..b3aa7ba 100644 --- a/src/src.pro +++ b/src/src.pro @@ -4,7 +4,7 @@ SUBDIRS += sensors sensors.subdir = sensors sensors.target = sub-sensors -!isEmpty(QT.quick.name) { +qtHaveModule(quick) { SUBDIRS += imports imports.subdir = imports imports.target = sub-imports |