From b08c3e69e3e82014b0f16b1ff94e5edd31d5c2c6 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Fri, 20 May 2016 10:45:25 +0200 Subject: Add changelog for Qt 5.6.1 release of QtSensors Change-Id: I378943bd0ce89689b43eee4971a306c6f73fcb10 Reviewed-by: Leena Miettinen --- dist/changes-5.6.1 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 dist/changes-5.6.1 diff --git a/dist/changes-5.6.1 b/dist/changes-5.6.1 new file mode 100644 index 00000000..fce6ffcf --- /dev/null +++ b/dist/changes-5.6.1 @@ -0,0 +1,29 @@ +Qt 5.6.1 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.6.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.6/ + +The Qt version 5.6 series is binary compatible with the 5.5.x series. +Applications compiled for 5.5 will continue to run with 5.6. + +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 * +**************************************************************************** + +QtSensors +--------- + + - Fixed a few documentation issues + - Reduced size of PNGs in documentation and examples + - Cleaned up various project files across the module -- cgit v1.2.3 From 7deae40b87e1637d55de8d111e99f4da1d5584d4 Mon Sep 17 00:00:00 2001 From: Alex Blasche Date: Fri, 20 May 2016 10:54:50 +0200 Subject: Add changelog for Qt 5.7.0 release of QtSensors Change-Id: I7b91766f9ca479d69f1bd505994a643471a0feb7 Reviewed-by: Leena Miettinen Reviewed-by: Ulf Hermann --- dist/changes-5.7.0 | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 dist/changes-5.7.0 diff --git a/dist/changes-5.7.0 b/dist/changes-5.7.0 new file mode 100644 index 00000000..2606474b --- /dev/null +++ b/dist/changes-5.7.0 @@ -0,0 +1,26 @@ +Qt 5.7 introduces many new features and improvements as well as bugfixes +over the 5.6.x series. For more details, refer to the online documentation +included in this distribution. The documentation is also available online: + + http://doc.qt.io/qt-5/index.html + +The Qt version 5.7 series is binary compatible with the 5.6.x series. +Applications compiled for 5.6 will continue to run with 5.7. + +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. + +**************************************************************************** +* Library * +**************************************************************************** + +QtSensors +--------- + + - Added support for iio-sensor-proxy. For more details see + https://github.com/hadess/iio-sensor-proxy. -- cgit v1.2.3 From cd1fc0b6ed27906c15b8f0e7f7e1b8cab147a3c3 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 20 May 2016 14:47:09 +0200 Subject: QCoverSensorGestureRecognizer: sanitize initialization. Coverity noticed uninitialized members (CID 22309). Eliminate members handler (never accessed or set; the code always uses QtSensorGestureSensorHandler::instance() instead) and lastTs (set but never accessed). Initialized timer (to 0; it'll be set more sensibly as long as create() gets called). Reformatted constructor. Change-Id: I41738ec51db94fb35e068af509e9a34bf9221770 Reviewed-by: Lorn Potter --- .../qtsensors/qcoversensorgesturerecognizer.cpp | 11 +++++++---- .../sensorgestures/qtsensors/qcoversensorgesturerecognizer.h | 2 -- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp index ba010048..5b846c5a 100644 --- a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp +++ b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp @@ -36,9 +36,13 @@ QT_BEGIN_NAMESPACE -QCoverSensorGestureRecognizer::QCoverSensorGestureRecognizer(QObject *parent) : - QSensorGestureRecognizer(parent), - orientationReading(0), proximityReading(0),active(0), detecting(0) +QCoverSensorGestureRecognizer::QCoverSensorGestureRecognizer(QObject *parent) + : QSensorGestureRecognizer(parent), + orientationReading(0), + proximityReading(0), + timer(0), + active(0), + detecting(0) { } @@ -114,7 +118,6 @@ void QCoverSensorGestureRecognizer::proximityChanged(QProximityReading *reading) detecting = true; } } - lastTs = reading->timestamp(); } void QCoverSensorGestureRecognizer::orientationReadingChanged(QOrientationReading *reading) diff --git a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.h b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.h index 3425ba32..220e83a5 100644 --- a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.h +++ b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.h @@ -70,10 +70,8 @@ private: bool proximityReading; QTimer *timer; - QtSensorGestureSensorHandler *handler; bool active; bool detecting; - qreal lastTs; }; QT_END_NAMESPACE -- cgit v1.2.3 From 79d3d49c4c4bf1d07f377d24d8c6e571abe80355 Mon Sep 17 00:00:00 2001 From: Ralf Nolden Date: Sat, 28 May 2016 13:30:33 +0200 Subject: OpenBSD: librt.so is not available on system OpenBSD does not provide librt.so for the sensors module, which leads to linker errors in this case. Disable linking to librt.so by adding !openbsd to the list of OSes not having it. Change-Id: If7b33eb33b4027be79bce4bb3272bef3a5b7d832 Reviewed-by: Thiago Macieira --- src/plugins/sensors/dummy/dummy.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/sensors/dummy/dummy.pro b/src/plugins/sensors/dummy/dummy.pro index b4ef2fda..6eab4912 100644 --- a/src/plugins/sensors/dummy/dummy.pro +++ b/src/plugins/sensors/dummy/dummy.pro @@ -12,7 +12,7 @@ SOURCES += dummycommon.cpp\ OTHER_FILES = plugin.json -unix:!mac:!qnx:!android:LIBS+=-lrt +unix:!darwin:!qnx:!android:!openbsd: LIBS += -lrt PLUGIN_TYPE = sensors PLUGIN_CLASS_NAME = dummySensorPlugin -- cgit v1.2.3 From ea21a76606259eca44e2b4f7d42c2127950c2987 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 8 Jun 2016 13:09:23 +0200 Subject: Mention license change in 5.7.0 changelog. Change-Id: I66ed8666507084283a550a54a0c24530dced2e66 Task-number: QTBUG-53913 Reviewed-by: Sami Makkonen Reviewed-by: Jani Heikkinen --- dist/changes-5.7.0 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/dist/changes-5.7.0 b/dist/changes-5.7.0 index 2606474b..79a8a748 100644 --- a/dist/changes-5.7.0 +++ b/dist/changes-5.7.0 @@ -1,6 +1,7 @@ Qt 5.7 introduces many new features and improvements as well as bugfixes -over the 5.6.x series. For more details, refer to the online documentation -included in this distribution. The documentation is also available online: +over the 5.6.x series. Also, there is a change in the licensing terms. +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: http://doc.qt.io/qt-5/index.html @@ -15,6 +16,21 @@ corresponding to tasks in the Qt Bug Tracker: Each of these identifiers can be entered in the bug tracker to obtain more information about a particular change. +**************************************************************************** +* Important License Changes * +**************************************************************************** + + This module is no longer available under LGPLv2.1. The libraries are + now available under the following licenses: + * Commercial License + * GNU General Public License v2.0 (LICENSE.GPL2) and later + * GNU Lesser General Public License v3.0 (LICENSE.LGPL3) + + The tools are now available under the following licenses: + * Commercial License + * GNU General Public License 3.0 (LICENSE.GPL3) with exceptions + described in The Qt Company GPL Exception 1.0 (LICENSE.GPL3-EXCEPT) + **************************************************************************** * Library * **************************************************************************** -- cgit v1.2.3 From 90eb1a41702bf748ac3f356d8ce04496f75ecb64 Mon Sep 17 00:00:00 2001 From: Sze Howe Koh Date: Wed, 15 Jun 2016 08:38:36 +0800 Subject: Expand license scope from "Qt GUI Toolkit" to "Qt Toolkit" See http://comments.gmane.org/gmane.comp.lib.qt.devel/25771 Change-Id: I318af27c165bdb2c1f9e8cc71814547e7d6b23da Reviewed-by: Lorn Potter --- LICENSE.GPLv2 | 2 +- LICENSE.GPLv3 | 2 +- LICENSE.LGPLv21 | 2 +- LICENSE.LGPLv3 | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LICENSE.GPLv2 b/LICENSE.GPLv2 index 6dbb032f..a4244777 100644 --- a/LICENSE.GPLv2 +++ b/LICENSE.GPLv2 @@ -3,7 +3,7 @@ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd. Contact: http://www.qt.io/licensing/ - You may use, distribute and copy the Qt GUI Toolkit under the terms of + You may use, distribute and copy the Qt Toolkit under the terms of GNU General Public License version 2, which is displayed below. ------------------------------------------------------------------------- diff --git a/LICENSE.GPLv3 b/LICENSE.GPLv3 index 4e49b122..71c4ad49 100644 --- a/LICENSE.GPLv3 +++ b/LICENSE.GPLv3 @@ -3,7 +3,7 @@ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd. Contact: http://www.qt.io/licensing/ - You may use, distribute and copy the Qt GUI Toolkit under the terms of + You may use, distribute and copy the Qt Toolkit under the terms of GNU Lesser General Public License version 3. That license references the General Public License version 3, that is displayed below. Other portions of the Qt Toolkit may be licensed directly under this license. diff --git a/LICENSE.LGPLv21 b/LICENSE.LGPLv21 index 6e184611..dfcab5e2 100644 --- a/LICENSE.LGPLv21 +++ b/LICENSE.LGPLv21 @@ -3,7 +3,7 @@ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd. Contact: http://www.qt.io/licensing/ - You may use, distribute and copy the Qt GUI Toolkit under the terms of + You may use, distribute and copy the Qt Toolkit under the terms of GNU Lesser General Public License version 2.1, which is displayed below. ------------------------------------------------------------------------- diff --git a/LICENSE.LGPLv3 b/LICENSE.LGPLv3 index 4d67bac0..6bf924cd 100644 --- a/LICENSE.LGPLv3 +++ b/LICENSE.LGPLv3 @@ -3,7 +3,7 @@ The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd. Contact: http://www.qt.io/licensing/ - You may use, distribute and copy the Qt GUI Toolkit under the terms of + You may use, distribute and copy the Qt Toolkit under the terms of GNU Lesser General Public License version 3, which is displayed below. This license makes reference to the version 3 of the GNU General Public License, which you can find in the LICENSE.GPLv3 file. -- cgit v1.2.3 From 6221ea85ec76566125b9c5e427a66ff13e8f5867 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Jun 2016 14:39:28 -0700 Subject: Use QDateTime::currentMSecsSinceEpoch() instead of currentDateTime More efficient if all you want is the number of seconds. Change-Id: Ib57b52598e2f452985e9fffd145a371003ede342 Reviewed-by: Lorn Potter --- src/plugins/sensors/simulator/simulatoraccelerometer.cpp | 2 +- src/plugins/sensors/simulator/simulatorambientlightsensor.cpp | 2 +- src/plugins/sensors/simulator/simulatorcompass.cpp | 2 +- src/plugins/sensors/simulator/simulatorirproximitysensor.cpp | 2 +- src/plugins/sensors/simulator/simulatorlightsensor.cpp | 2 +- src/plugins/sensors/simulator/simulatormagnetometer.cpp | 2 +- src/plugins/sensors/simulator/simulatorproximitysensor.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/sensors/simulator/simulatoraccelerometer.cpp b/src/plugins/sensors/simulator/simulatoraccelerometer.cpp index 9d2c9290..481128f4 100644 --- a/src/plugins/sensors/simulator/simulatoraccelerometer.cpp +++ b/src/plugins/sensors/simulator/simulatoraccelerometer.cpp @@ -54,7 +54,7 @@ void SimulatorAccelerometer::poll() QtMobility::QAccelerometerReadingData data = SensorsConnection::instance()->qtAccelerometerData; quint64 newTimestamp; if (!data.timestamp.isValid()) - newTimestamp = QDateTime::currentDateTime().toTime_t(); + newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000; else newTimestamp = data.timestamp.toTime_t(); if (m_reading.x() != data.x diff --git a/src/plugins/sensors/simulator/simulatorambientlightsensor.cpp b/src/plugins/sensors/simulator/simulatorambientlightsensor.cpp index fa6f4878..177684fe 100644 --- a/src/plugins/sensors/simulator/simulatorambientlightsensor.cpp +++ b/src/plugins/sensors/simulator/simulatorambientlightsensor.cpp @@ -76,7 +76,7 @@ void SimulatorAmbientLightSensor::poll() quint64 newTimestamp; if (!data.timestamp.isValid()) - newTimestamp = QDateTime::currentDateTime().toTime_t(); + newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000; else newTimestamp = data.timestamp.toTime_t(); if (m_reading.lightLevel() != convertedLightLevel) { diff --git a/src/plugins/sensors/simulator/simulatorcompass.cpp b/src/plugins/sensors/simulator/simulatorcompass.cpp index a64f3a11..fc68c513 100644 --- a/src/plugins/sensors/simulator/simulatorcompass.cpp +++ b/src/plugins/sensors/simulator/simulatorcompass.cpp @@ -54,7 +54,7 @@ void SimulatorCompass::poll() QtMobility::QCompassReadingData data = SensorsConnection::instance()->qtCompassData; quint64 newTimestamp; if (!data.timestamp.isValid()) - newTimestamp = QDateTime::currentDateTime().toTime_t(); + newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000; else newTimestamp = data.timestamp.toTime_t(); if (m_reading.azimuth() != data.azimuth diff --git a/src/plugins/sensors/simulator/simulatorirproximitysensor.cpp b/src/plugins/sensors/simulator/simulatorirproximitysensor.cpp index 02594370..4499128f 100644 --- a/src/plugins/sensors/simulator/simulatorirproximitysensor.cpp +++ b/src/plugins/sensors/simulator/simulatorirproximitysensor.cpp @@ -54,7 +54,7 @@ void SimulatorIRProximitySensor::poll() QtMobility::QIRProximityReadingData data = SensorsConnection::instance()->qtIRProximityData; quint64 newTimestamp; if (!data.timestamp.isValid()) - newTimestamp = QDateTime::currentDateTime().toTime_t(); + newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000; else newTimestamp = data.timestamp.toTime_t(); if (m_reading.reflectance() != data.irProximity) { diff --git a/src/plugins/sensors/simulator/simulatorlightsensor.cpp b/src/plugins/sensors/simulator/simulatorlightsensor.cpp index bdcfadf4..40d9edbd 100644 --- a/src/plugins/sensors/simulator/simulatorlightsensor.cpp +++ b/src/plugins/sensors/simulator/simulatorlightsensor.cpp @@ -54,7 +54,7 @@ void SimulatorLightSensor::poll() QtMobility::QLightReadingData data = SensorsConnection::instance()->qtLightData; quint64 newTimestamp; if (!data.timestamp.isValid()) - newTimestamp = QDateTime::currentDateTime().toTime_t(); + newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000; else newTimestamp = data.timestamp.toTime_t(); if (m_reading.lux() != data.lux) { diff --git a/src/plugins/sensors/simulator/simulatormagnetometer.cpp b/src/plugins/sensors/simulator/simulatormagnetometer.cpp index c3f2c8ac..64a31776 100644 --- a/src/plugins/sensors/simulator/simulatormagnetometer.cpp +++ b/src/plugins/sensors/simulator/simulatormagnetometer.cpp @@ -54,7 +54,7 @@ void SimulatorMagnetometer::poll() QtMobility::QMagnetometerReadingData data = SensorsConnection::instance()->qtMagnetometerData; quint64 newTimestamp; if (!data.timestamp.isValid()) - newTimestamp = QDateTime::currentDateTime().toTime_t(); + newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000; else newTimestamp = data.timestamp.toTime_t(); if (m_reading.x() != data.x diff --git a/src/plugins/sensors/simulator/simulatorproximitysensor.cpp b/src/plugins/sensors/simulator/simulatorproximitysensor.cpp index 74a35f61..b4430959 100644 --- a/src/plugins/sensors/simulator/simulatorproximitysensor.cpp +++ b/src/plugins/sensors/simulator/simulatorproximitysensor.cpp @@ -54,7 +54,7 @@ void SimulatorProximitySensor::poll() QtMobility::QProximityReadingData data = SensorsConnection::instance()->qtProximityData; quint64 newTimestamp; if (!data.timestamp.isValid()) - newTimestamp = QDateTime::currentDateTime().toTime_t(); + newTimestamp = QDateTime::currentMSecsSinceEpoch() / 1000; else newTimestamp = data.timestamp.toTime_t(); if (m_reading.close() != data.close) { -- cgit v1.2.3 From 8b79fc4ee1c0510c13dc6f1494f37727e3f8c0cf Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Wed, 20 Jul 2016 15:51:07 +0300 Subject: Make sure JNI_OnLoad is not called more than once Since Android 5.0 Google introduce a nasty bug[1] which calls JNI_OnLoad more than once. Basically every time when a library is loaded JNI_OnLoad is called if found, but it calls *again* JNI_OnLoad of its .so dependencies! [1] Workaround https://code.google.com/p/android/issues/detail?id=215069 Change-Id: I34728572bc279581b8c95c42c206ed104bfc09a5 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/plugins/sensors/android/src/androidjnisensors.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/sensors/android/src/androidjnisensors.cpp b/src/plugins/sensors/android/src/androidjnisensors.cpp index 98f408a9..ce69e757 100644 --- a/src/plugins/sensors/android/src/androidjnisensors.cpp +++ b/src/plugins/sensors/android/src/androidjnisensors.cpp @@ -241,6 +241,11 @@ static bool registerNatives(JNIEnv *env) Q_DECL_EXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void * /*reserved*/) { + static bool initialized = false; + if (initialized) + return JNI_VERSION_1_6; + initialized = true; + typedef union { JNIEnv *nativeEnvironment; void *venv; -- cgit v1.2.3 From e03c37077ea4841b9e0b591d29a34737d7d8dd32 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Mon, 18 Jul 2016 16:55:52 +0300 Subject: This module doesn't need an Activity to work, a Context object is enough Task-number: QTBUG-54506 Change-Id: I83576e79f12556479a43aac95123edcacd50c63c Reviewed-by: Alex Blasche Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../jar/src/org/qtproject/qt5/android/sensors/QtSensors.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/sensors/android/jar/src/org/qtproject/qt5/android/sensors/QtSensors.java b/src/plugins/sensors/android/jar/src/org/qtproject/qt5/android/sensors/QtSensors.java index 75f2e933..3067d401 100644 --- a/src/plugins/sensors/android/jar/src/org/qtproject/qt5/android/sensors/QtSensors.java +++ b/src/plugins/sensors/android/jar/src/org/qtproject/qt5/android/sensors/QtSensors.java @@ -42,7 +42,7 @@ package org.qtproject.qt5.android.sensors; import java.util.HashSet; import java.util.List; -import android.app.Activity; +import android.content.Context; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; @@ -58,10 +58,10 @@ public class QtSensors implements SensorEventListener static SensorManager m_sensorManager = null; static SparseArray m_registeredSensors = new SparseArray(); static Object m_syncObject = new Object(); - static public void setActivity(Activity activity, Object acitvityDelegate) + static public void setContext(Context context) { try { - m_sensorManager = (SensorManager)activity.getSystemService(Activity.SENSOR_SERVICE); + m_sensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); } catch(Exception e) { e.printStackTrace(); } -- cgit v1.2.3 From 9d4827207167a2eeab5e6df5dbcdfe12c5e9d6a1 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Jul 2016 13:51:14 +0200 Subject: Bump version Change-Id: I3b87cdb8f68617532d37f52e226f249cb7c4b174 --- .qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.qmake.conf b/.qmake.conf index 4ef70163..a2a0d418 100644 --- a/.qmake.conf +++ b/.qmake.conf @@ -1,3 +1,3 @@ load(qt_build_config) -MODULE_VERSION = 5.7.0 +MODULE_VERSION = 5.7.1 -- cgit v1.2.3