From ce508999540cb125dad40dd250b17e6ad20d542b Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Fri, 3 May 2019 10:14:19 +0300 Subject: Add changes file for Qt 5.13.0 Change-Id: Ifa95b57b75cab2392c1f1b7e3baa94436f9e898b Reviewed-by: Alex Blasche --- dist/changes-5.13.0 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dist/changes-5.13.0 diff --git a/dist/changes-5.13.0 b/dist/changes-5.13.0 new file mode 100644 index 0000000..cdea881 --- /dev/null +++ b/dist/changes-5.13.0 @@ -0,0 +1,24 @@ +Qt 5.13 introduces many new features and improvements as well as bugfixes +over the 5.12.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.13 series is binary compatible with the 5.12.x series. +Applications compiled for 5.12 will continue to run with 5.13. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Android * +**************************************************************************** + + - Rewrite Qt Android Sensors using NDK API. + - Raise minimal Android sdk version to v21 + -- cgit v1.2.1 From 14b5821f7b9998c1263c592d2cc70f21f1e72981 Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Wed, 8 May 2019 18:33:55 +1000 Subject: Do not register iio sensors if the dbus service is not found Fixes: QTBUG-74905 Change-Id: I78ca045d2723fa47dc2d0f9cc559320be84e5f32 Reviewed-by: Alex Blasche --- src/plugins/sensors/iio-sensor-proxy/main.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/plugins/sensors/iio-sensor-proxy/main.cpp b/src/plugins/sensors/iio-sensor-proxy/main.cpp index 136dd40..580e2c4 100644 --- a/src/plugins/sensors/iio-sensor-proxy/main.cpp +++ b/src/plugins/sensors/iio-sensor-proxy/main.cpp @@ -46,6 +46,9 @@ #include #include +#include +#include + #include #include @@ -57,12 +60,14 @@ class IIOSensorProxySensorPlugin : public QObject, public QSensorPluginInterface public: void registerSensors() override { - if (!QSensorManager::isBackendRegistered(QOrientationSensor::type, IIOSensorProxyOrientationSensor::id)) - QSensorManager::registerBackend(QOrientationSensor::type, IIOSensorProxyOrientationSensor::id, this); - if (!QSensorManager::isBackendRegistered(QLightSensor::type, IIOSensorProxyLightSensor::id)) - QSensorManager::registerBackend(QLightSensor::type, IIOSensorProxyLightSensor::id, this); - if (!QSensorManager::isBackendRegistered(QCompass::type, IIOSensorProxyCompass::id)) - QSensorManager::registerBackend(QCompass::type, IIOSensorProxyCompass::id, this); + if (QDBusConnection::systemBus().interface()->isServiceRegistered("net.hadess.SensorProxy")) { + if (!QSensorManager::isBackendRegistered(QOrientationSensor::type, IIOSensorProxyOrientationSensor::id)) + QSensorManager::registerBackend(QOrientationSensor::type, IIOSensorProxyOrientationSensor::id, this); + if (!QSensorManager::isBackendRegistered(QLightSensor::type, IIOSensorProxyLightSensor::id)) + QSensorManager::registerBackend(QLightSensor::type, IIOSensorProxyLightSensor::id, this); + if (!QSensorManager::isBackendRegistered(QCompass::type, IIOSensorProxyCompass::id)) + QSensorManager::registerBackend(QCompass::type, IIOSensorProxyCompass::id, this); + } } QSensorBackend *createBackend(QSensor *sensor) override -- cgit v1.2.1 From d5888b178da6d34704ee074065f176000ffaab29 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 23 May 2019 11:17:28 +0200 Subject: Bump version Change-Id: Ifa24637050a659b86c8690731d8a9748def2643c --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 1bf9543..f1a6177 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,3 @@ load(qt_build_config) -MODULE_VERSION = 5.12.3 +MODULE_VERSION = 5.12.4 -- cgit v1.2.1 From 6e30eaa1bda78b16fe9f467ad328a085bb3def09 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Thu, 23 May 2019 15:20:42 +0300 Subject: Add changes file for Qt 5.12.4 Change-Id: I44dee9a796862d1c25b7dedd8f96decda6be0978 Reviewed-by: BogDan Vatra --- dist/changes-5.12.4 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 dist/changes-5.12.4 diff --git a/dist/changes-5.12.4 b/dist/changes-5.12.4 new file mode 100644 index 0000000..46807db --- /dev/null +++ b/dist/changes-5.12.4 @@ -0,0 +1,24 @@ +Qt 5.12.4 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.3. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Android * +**************************************************************************** + + - Rewrite Qt Android Sensors using NDK API. -- cgit v1.2.1 From ed0b4ed792504dc68d2f009ca19d69ef856002ba Mon Sep 17 00:00:00 2001 From: Lorn Potter Date: Mon, 17 Jun 2019 18:56:06 +1000 Subject: fix typo that breaks android build Fixes: QTBUG-76384 Change-Id: Ib1977ea1371e3a82ca14d1c7c450984fa40cd71d Reviewed-by: Vyacheslav Koscheev Reviewed-by: Alex Blasche --- src/plugins/sensors/android/sensormanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/sensors/android/sensormanager.cpp b/src/plugins/sensors/android/sensormanager.cpp index 590f478..542e54c 100644 --- a/src/plugins/sensors/android/sensormanager.cpp +++ b/src/plugins/sensors/android/sensormanager.cpp @@ -73,7 +73,7 @@ ALooper *SensorManager::looper() const static inline ASensorManager* androidManager() { #if __ANDROID_API__ >= 26 - retrun ASensorManager_getInstanceForPackage(QJNIObjectPrivate{QtAndroidPrivate::context()} + return ASensorManager_getInstanceForPackage(QJNIObjectPrivate{QtAndroidPrivate::context()} .callObjectMethod("getPackageName", "()Ljava/lang/String;") .toString().toUtf8().constData()); #else -- cgit v1.2.1 From 9e475f2f08cd528b773e67a304aa85d8d0d298d8 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 1 Jul 2019 15:55:44 +0200 Subject: Bump version Change-Id: I33c8461b4cee52be9cb0b64af8e4dc9e1b14d44d --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index f8cda0e..1ed62c5 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,3 @@ load(qt_build_config) -MODULE_VERSION = 5.13.0 +MODULE_VERSION = 5.13.1 -- cgit v1.2.1 From 8b741cadcafd76c3de167d0b7a31be4fe25623d9 Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Mon, 1 Jul 2019 16:02:03 +0200 Subject: Bump version Change-Id: I46e918c5aa1a173cc9f954bca73ac465f60041e7 --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index f1a6177..b5454e5 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,3 @@ load(qt_build_config) -MODULE_VERSION = 5.12.4 +MODULE_VERSION = 5.12.5 -- cgit v1.2.1 From 154ecd7b3048f22ee549c3838cc153cbc8cd33d2 Mon Sep 17 00:00:00 2001 From: Kai Pastor Date: Tue, 2 Jul 2019 20:09:57 +0200 Subject: Android: Don't crash for unsupported accelerometer mode According to documentation, changing the mode shall have no effect when the device does not support a particular mode. Task-number: QTBUG-76862 Change-Id: I805daa3a3f659e8aed25e4b7b6531f804dd654b2 Reviewed-by: BogDan Vatra --- src/plugins/sensors/android/androidaccelerometer.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/plugins/sensors/android/androidaccelerometer.cpp b/src/plugins/sensors/android/androidaccelerometer.cpp index c9f5141..f38e004 100644 --- a/src/plugins/sensors/android/androidaccelerometer.cpp +++ b/src/plugins/sensors/android/androidaccelerometer.cpp @@ -82,18 +82,24 @@ void AndroidAccelerometer::applyAccelerationMode(QAccelerometer::AccelerationMod { switch (accelerationMode) { case QAccelerometer::Gravity: - if (!(m_accelerationModes & Gravity)) + if (!(m_accelerationModes & Gravity)) { qWarning() << "Gravity sensor missing"; + return; + } setSensorType(ASENSOR_TYPE_GRAVITY); break; case QAccelerometer::User: - if (!(m_accelerationModes & LinearAcceleration)) + if (!(m_accelerationModes & LinearAcceleration)) { qWarning() << "Linear acceleration sensor missing"; + return; + } setSensorType(ASENSOR_TYPE_LINEAR_ACCELERATION); break; case QAccelerometer::Combined: - if (!(m_accelerationModes & Accelerometer)) + if (!(m_accelerationModes & Accelerometer)) { qWarning() << "Accelerometer sensor missing"; + return; + } setSensorType(ASENSOR_TYPE_ACCELEROMETER); break; } -- cgit v1.2.1 From 777204e439c8edd35e021a73cddd80f4c85ef4f5 Mon Sep 17 00:00:00 2001 From: Gaurav Kalra Date: Fri, 5 Jul 2019 14:32:10 +0900 Subject: qmltypes: export humidity/distance interface Task-number: QTBUG-76133 Change-Id: Iae28989a509384c3fad0fe5b4222e5cc1068881c Reviewed-by: Kai Koehne --- src/imports/sensors/plugins.qmltypes | 29 +++++++++++++++++++++++++++++ src/imports/sensors/sensors.cpp | 11 +++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/imports/sensors/plugins.qmltypes b/src/imports/sensors/plugins.qmltypes index fc97257..d16b2be 100644 --- a/src/imports/sensors/plugins.qmltypes +++ b/src/imports/sensors/plugins.qmltypes @@ -128,6 +128,20 @@ Module { Property { name: "azimuth"; type: "double"; isReadonly: true } Property { name: "calibrationLevel"; type: "double"; isReadonly: true } } + Component { + name: "QmlDistanceReading" + prototype: "QmlSensorReading" + exports: ["QtSensors/DistanceReading 5.4"] + isCreatable: false + exportMetaObjectRevisions: [0] + Property { name: "distance"; type: "double"; isReadonly: true } + } + Component { + name: "QmlDistanceSensor" + prototype: "QmlSensor" + exports: ["QtSensors/DistanceSensor 5.4"] + exportMetaObjectRevisions: [0] + } Component { name: "QmlGyroscope" prototype: "QmlSensor" @@ -172,6 +186,21 @@ Module { ] exportMetaObjectRevisions: [0, 0] } + Component { + name: "QmlHumidityReading" + prototype: "QmlSensorReading" + exports: ["QtSensors/HumidityReading 5.9"] + isCreatable: false + exportMetaObjectRevisions: [0] + Property { name: "relativeHumidity"; type: "double"; isReadonly: true } + Property { name: "absoluteHumidity"; type: "double"; isReadonly: true } + } + Component { + name: "QmlHumiditySensor" + prototype: "QmlSensor" + exports: ["QtSensors/HumiditySensor 5.9"] + exportMetaObjectRevisions: [0] + } Component { name: "QmlIRProximitySensor" prototype: "QmlSensor" diff --git a/src/imports/sensors/sensors.cpp b/src/imports/sensors/sensors.cpp index fa4cb3c..ce80a45 100644 --- a/src/imports/sensors/sensors.cpp +++ b/src/imports/sensors/sensors.cpp @@ -46,6 +46,8 @@ #include #include #include +#include +#include #include #include #include @@ -64,8 +66,10 @@ #include "qmlambientlightsensor.h" #include "qmlambienttemperaturesensor.h" #include "qmlcompass.h" +#include "qmldistancesensor.h" #include "qmlgyroscope.h" #include "qmlholstersensor.h" +#include "qmlhumiditysensor.h" #include "qmlirproximitysensor.h" #include "qmllightsensor.h" #include "qmlmagnetometer.h" @@ -217,11 +221,18 @@ public: qmlRegisterType (package, major, minor, "SensorGesture"); + // Register the 5.4 interfaces + minor = 4; + qmlRegisterType (package, major, minor, "DistanceSensor"); + qmlRegisterUncreatableType(package, major, minor, "DistanceReading", QLatin1String("Cannot create DistanceReading")); + // Register the new 5.9 interfaces // Implicitly registers 5.3 - 5.8 too minor = 9; qmlRegisterType (package, major, minor, "LidSensor"); qmlRegisterUncreatableType(package, major, minor, "LidReading", QLatin1String("Cannot create LidReading")); + qmlRegisterType (package, major, minor, "HumiditySensor"); + qmlRegisterUncreatableType(package, major, minor, "HumidityReading", QLatin1String("Cannot create HumidityReading")); // Register the latest Qt version as QML type version qmlRegisterModule(package, QT_VERSION_MAJOR, QT_VERSION_MINOR); -- cgit v1.2.1 From ff2b9bd23ccd52f9e02fbc24ef66c863f0dc9250 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Wed, 3 Jul 2019 12:14:12 +0200 Subject: Doc: Replace example file lists with links to code.qt.io Task-number: QTBUG-74391 Change-Id: Iacab2b6735bef1d52c640cb7b3e51ae3aa010a56 Reviewed-by: Paul Wicking --- src/sensors/doc/qtsensors.qdocconf | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sensors/doc/qtsensors.qdocconf b/src/sensors/doc/qtsensors.qdocconf index 8b9b95d..0845e70 100644 --- a/src/sensors/doc/qtsensors.qdocconf +++ b/src/sensors/doc/qtsensors.qdocconf @@ -1,5 +1,6 @@ include($QT_INSTALL_DOCS/global/qt-html-templates-offline.qdocconf) include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) +include($QT_INSTALL_DOCS/config/exampleurl-qtsensors.qdocconf) project = QtSensors description = Qt Sensors Reference Documentation -- cgit v1.2.1 From 70c2dd24800527908e92fb0ce181b939dbd6141e Mon Sep 17 00:00:00 2001 From: Paul Wicking Date: Wed, 10 Jul 2019 11:31:55 +0200 Subject: Doc: Prefer public over private API in links This change uses the public API and removes references to private API. Task-number: QTBUG-76978 Change-Id: Ifd53dc520a38ff87b12271b7b446fd42753bb7f3 Reviewed-by: Sze Howe Koh --- src/sensors/doc/src/qtsensors-cpp.qdoc | 2 +- src/sensors/qcompass.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sensors/doc/src/qtsensors-cpp.qdoc b/src/sensors/doc/src/qtsensors-cpp.qdoc index b0d2726..d732a0d 100644 --- a/src/sensors/doc/src/qtsensors-cpp.qdoc +++ b/src/sensors/doc/src/qtsensors-cpp.qdoc @@ -56,7 +56,7 @@ Where rotation around an axis is used, the rotation shall be expressed as a Righ \image sensors-coordinates3.jpg -In general, sensor data is oriented relative to \l QPlatformScreen::nativeOrientation, +In general, sensor data is oriented relative to \l QScreen::nativeOrientation, that is to the top of the device when the device is held in its natural orientation (normally when the device logo appears the right side up). If values are to be displayed on the screen, the values may need to be transformed so that they match diff --git a/src/sensors/qcompass.cpp b/src/sensors/qcompass.cpp index 5177a17..1965934 100644 --- a/src/sensors/qcompass.cpp +++ b/src/sensors/qcompass.cpp @@ -74,7 +74,7 @@ IMPLEMENT_READING(QCompassReading) \brief the azimuth of the device. Measured in degrees from magnetic north in a clockwise direction based on - the top of the device, as defined by QPlatformScreen::nativeOrientation. + the top of the device, as defined by QScreen::nativeOrientation. \sa {QCompassReading Units} */ -- cgit v1.2.1