diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 19:51:54 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-14 19:51:54 +0200 |
commit | 5efb5dac71baf7910be0ebf5debb2b0236adf8fe (patch) | |
tree | e01842e7e0c86c57096a49012381bd37f69dad52 | |
parent | 8bd96b78bdf3598549d9de4256af4df93781c528 (diff) | |
parent | d8e357f75a05bce5e1286c94e2b1954f6591218e (diff) | |
download | qtsensors-5efb5dac71baf7910be0ebf5debb2b0236adf8fe.tar.gz |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I4286dcb9262bf38960ff3852932012718aaa5d65
-rw-r--r-- | dist/changes-5.5.1 | 32 | ||||
-rw-r--r--[-rwxr-xr-x] | examples/sensors/accelbubble/doc/images/accelbubble.png | bin | 5181 -> 5181 bytes | |||
-rw-r--r-- | src/plugins/sensors/generic/main.cpp | 20 | ||||
-rw-r--r-- | src/plugins/sensors/sensorfw/main.cpp | 3 | ||||
-rw-r--r-- | src/sensors/doc/src/compatmap.qdoc | 2 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors-backend.qdoc | 14 | ||||
-rw-r--r-- | src/sensors/doc/src/qtsensors5.qdoc | 8 | ||||
-rw-r--r-- | tests/auto/qsensorgestures/plugins/test/qtestrecognizer.cpp | 2 |
8 files changed, 59 insertions, 22 deletions
diff --git a/dist/changes-5.5.1 b/dist/changes-5.5.1 new file mode 100644 index 0000000..57567d5 --- /dev/null +++ b/dist/changes-5.5.1 @@ -0,0 +1,32 @@ +Qt 5.5.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.5.0. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + + http://doc.qt.io/qt-5.5/ + +The Qt version 5.5 series is binary compatible with the 5.4.x series. +Applications compiled for 5.4 will continue to run with 5.5. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + + http://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Library * +**************************************************************************** + +**************************************************************************** +* Platform Specific Changes * +**************************************************************************** + +Sensor Framework platforms +-------------------------- + + - [QTBUG-47854] Fixed interaction between generic and sensorfw plugin. + diff --git a/examples/sensors/accelbubble/doc/images/accelbubble.png b/examples/sensors/accelbubble/doc/images/accelbubble.png Binary files differindex 84e876d..84e876d 100755..100644 --- a/examples/sensors/accelbubble/doc/images/accelbubble.png +++ b/examples/sensors/accelbubble/doc/images/accelbubble.png diff --git a/src/plugins/sensors/generic/main.cpp b/src/plugins/sensors/generic/main.cpp index 257e47e..0fe3126 100644 --- a/src/plugins/sensors/generic/main.cpp +++ b/src/plugins/sensors/generic/main.cpp @@ -72,10 +72,6 @@ public: if (!QSensorManager::isBackendRegistered(QRotationSensor::type, genericrotationsensor::id)) QSensorManager::registerBackend(QRotationSensor::type, genericrotationsensor::id, this); #endif -#ifdef QTSENSORS_GENERICALSSENSOR - if (!QSensorManager::isBackendRegistered(QAmbientLightSensor::type, genericalssensor::id)) - QSensorManager::registerBackend(QAmbientLightSensor::type, genericalssensor::id, this); -#endif #ifdef QTSENSORS_GENERICTILTSENSOR if (!QSensorManager::isBackendRegistered(QTiltSensor::type, GenericTiltSensor::id)) QSensorManager::registerBackend(QTiltSensor::type, GenericTiltSensor::id, this); @@ -89,15 +85,23 @@ public: if (QSensorManager::isBackendRegistered(QRotationSensor::type, genericrotationsensor::id)) QSensorManager::unregisterBackend(QRotationSensor::type, genericrotationsensor::id); #endif -#ifdef QTSENSORS_GENERICALSSENSOR - if (QSensorManager::isBackendRegistered(QAmbientLightSensor::type, genericalssensor::id)) - QSensorManager::unregisterBackend(QAmbientLightSensor::type, genericalssensor::id); -#endif #ifdef QTSENSORS_GENERICTILTSENSOR if (QSensorManager::isBackendRegistered(QTiltSensor::type, GenericTiltSensor::id)) QSensorManager::unregisterBackend(QTiltSensor::type, GenericTiltSensor::id); #endif } + + if (!QSensor::defaultSensorForType(QLightSensor::type).isEmpty()) { +#ifdef QTSENSORS_GENERICALSSENSOR + if (!QSensorManager::isBackendRegistered(QAmbientLightSensor::type, genericalssensor::id)) + QSensorManager::registerBackend(QAmbientLightSensor::type, genericalssensor::id, this); +#endif + } else { +#ifdef QTSENSORS_GENERICALSSENSOR + if (QSensorManager::isBackendRegistered(QAmbientLightSensor::type, genericalssensor::id)) + QSensorManager::unregisterBackend(QAmbientLightSensor::type, genericalssensor::id); +#endif + } } QSensorBackend *createBackend(QSensor *sensor) diff --git a/src/plugins/sensors/sensorfw/main.cpp b/src/plugins/sensors/sensorfw/main.cpp index b22b647..9951f09 100644 --- a/src/plugins/sensors/sensorfw/main.cpp +++ b/src/plugins/sensors/sensorfw/main.cpp @@ -65,7 +65,8 @@ public: QStringList keys = settings.allKeys(); for (int i=0,l=keys.size(); i<l; i++) { QString type = keys.at(i); - QSensorManager::registerBackend(type.toLocal8Bit(), settings.value(type).toByteArray(), this); + if (settings.value(type).toString().contains(QStringLiteral("sensorfw")))//register only ones we know + QSensorManager::registerBackend(type.toLocal8Bit(), settings.value(type).toByteArray(), this); } } diff --git a/src/sensors/doc/src/compatmap.qdoc b/src/sensors/doc/src/compatmap.qdoc index f6a99a9..4f45fcb 100644 --- a/src/sensors/doc/src/compatmap.qdoc +++ b/src/sensors/doc/src/compatmap.qdoc @@ -88,7 +88,7 @@ <td bgcolor="gray"></td> <td bgcolor="green"></td> <td bgcolor="gray"></td> - <td bgcolor="gray"></td> + <td bgcolor="green"></td> <td bgcolor="green"></td> </tr> <tr> diff --git a/src/sensors/doc/src/qtsensors-backend.qdoc b/src/sensors/doc/src/qtsensors-backend.qdoc index 98fcd74..65ea612 100644 --- a/src/sensors/doc/src/qtsensors-backend.qdoc +++ b/src/sensors/doc/src/qtsensors-backend.qdoc @@ -26,7 +26,7 @@ ****************************************************************************/ /*! -\group sensors_backend_topics +\page sensors-backend-topics.html \title Qt Sensors Backend \brief Describes how to use the Qt Sensors backend. @@ -37,8 +37,6 @@ hardware sensors. \section1 Overview -\section1 Backend API - QSensor instances talk to a backend object. Backends are usually supplied with the Qt Sensors library for a specific device, although third-party backends may be used as well. A backend can talk directly to hardware, or @@ -53,14 +51,16 @@ classes to use. \section1 Backend Topics -\generatelist related - +\list +\li \l{Creating a sensor plugin} +\li \l{Determining the default sensor for a type} +\li \l{Dynamic Sensor Backend Registration} +\endlist */ /*! \page creating-a-sensor-plugin.html \title Creating a sensor plugin -\ingroup sensors_backend_topics \section1 How a Sensor Plugin is Loaded @@ -83,7 +83,6 @@ An example follows. /*! \page determining-the-default-sensor-for-a-type.html \title Determining the default sensor for a type -\ingroup sensors_backend_topics \section1 Multiple Sensors Can Exist for a Type @@ -141,7 +140,6 @@ it is specified in \c{Sensors.conf}. /*! \page dynamic-sensor-backend-registration.html \title Dynamic Sensor Backend Registration -\ingroup sensors_backend_topics \section1 Static Backend Registration diff --git a/src/sensors/doc/src/qtsensors5.qdoc b/src/sensors/doc/src/qtsensors5.qdoc index 69e7abb..bf7fa98 100644 --- a/src/sensors/doc/src/qtsensors5.qdoc +++ b/src/sensors/doc/src/qtsensors5.qdoc @@ -51,14 +51,14 @@ If the module is imported into a namespace, some additional methods become available. - \code + \qml import QtSensors 5.0 - ... + // ... Component.onCompleted: { var types = QmlSensors.sensorTypes(); console.log(types.join(", ")); } - \endcode + \endqml The documentation for the module API can be found in SensorGlobal. @@ -75,4 +75,6 @@ The data from a sensor comes via a reading class. \annotatedlist qml-sensors_reading + + \section1 All QML Types */ diff --git a/tests/auto/qsensorgestures/plugins/test/qtestrecognizer.cpp b/tests/auto/qsensorgestures/plugins/test/qtestrecognizer.cpp index 25863ec..44fb317 100644 --- a/tests/auto/qsensorgestures/plugins/test/qtestrecognizer.cpp +++ b/tests/auto/qsensorgestures/plugins/test/qtestrecognizer.cpp @@ -53,7 +53,7 @@ void QTestRecognizer::timeout() { Q_EMIT detected("tested"); Q_EMIT tested(); - QTimer::singleShot(10,this, SLOT(timeout())); + QTimer::singleShot(100, this, SLOT(timeout())); } |