summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-08-02 10:31:22 +0200
committerLiang Qi <liang.qi@qt.io>2016-08-02 10:31:22 +0200
commitb421290b67507cfe125db206f378fc1b38eaae4e (patch)
treec3545d82d65b3b207e80446013f0499ddf0617f8
parent614326721259f1424981444ec84b6b9f4d6400ef (diff)
parentbeac0b2e3ea4b292f0473c00bcf68d75360f89ef (diff)
downloadqtsensors-b421290b67507cfe125db206f378fc1b38eaae4e.tar.gz
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: .qmake.conf Change-Id: I4be6cbe9e4ac981f46b3c45d271cac5c7fc677cb
-rw-r--r--LICENSE.GPLv22
-rw-r--r--LICENSE.GPLv32
-rw-r--r--LICENSE.LGPLv212
-rw-r--r--LICENSE.LGPLv32
-rw-r--r--dist/changes-5.6.129
-rw-r--r--dist/changes-5.7.042
-rw-r--r--src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp11
-rw-r--r--src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.h2
-rw-r--r--src/plugins/sensors/android/jar/src/org/qtproject/qt5/android/sensors/QtSensors.java6
-rw-r--r--src/plugins/sensors/android/src/androidjnisensors.cpp5
-rw-r--r--src/plugins/sensors/dummy/dummy.pro2
-rw-r--r--src/plugins/sensors/simulator/simulatoraccelerometer.cpp2
-rw-r--r--src/plugins/sensors/simulator/simulatorambientlightsensor.cpp2
-rw-r--r--src/plugins/sensors/simulator/simulatorcompass.cpp2
-rw-r--r--src/plugins/sensors/simulator/simulatorirproximitysensor.cpp2
-rw-r--r--src/plugins/sensors/simulator/simulatorlightsensor.cpp2
-rw-r--r--src/plugins/sensors/simulator/simulatormagnetometer.cpp2
-rw-r--r--src/plugins/sensors/simulator/simulatorproximitysensor.cpp2
18 files changed, 98 insertions, 21 deletions
diff --git a/LICENSE.GPLv2 b/LICENSE.GPLv2
index 6dbb032..a424477 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 4e49b12..71c4ad4 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 6e18461..dfcab5e 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 4d67bac..6bf924c 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.
diff --git a/dist/changes-5.6.1 b/dist/changes-5.6.1
new file mode 100644
index 0000000..fce6ffc
--- /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
diff --git a/dist/changes-5.7.0 b/dist/changes-5.7.0
new file mode 100644
index 0000000..79a8a74
--- /dev/null
+++ b/dist/changes-5.7.0
@@ -0,0 +1,42 @@
+Qt 5.7 introduces many new features and improvements as well as bugfixes
+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
+
+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.
+
+****************************************************************************
+* 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 *
+****************************************************************************
+
+QtSensors
+---------
+
+ - Added support for iio-sensor-proxy. For more details see
+ https://github.com/hadess/iio-sensor-proxy.
diff --git a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp
index be26522..6bb65e9 100644
--- a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp
+++ b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.cpp
@@ -42,9 +42,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)
{
}
@@ -120,7 +124,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 e7ca3ab..1478e70 100644
--- a/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.h
+++ b/src/plugins/sensorgestures/qtsensors/qcoversensorgesturerecognizer.h
@@ -76,10 +76,8 @@ private:
bool proximityReading;
QTimer *timer;
- QtSensorGestureSensorHandler *handler;
bool active;
bool detecting;
- qreal lastTs;
};
QT_END_NAMESPACE
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 75f2e93..3067d40 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<Sensor> m_registeredSensors = new SparseArray<Sensor>();
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();
}
diff --git a/src/plugins/sensors/android/src/androidjnisensors.cpp b/src/plugins/sensors/android/src/androidjnisensors.cpp
index 67fe907..5e0e414 100644
--- a/src/plugins/sensors/android/src/androidjnisensors.cpp
+++ b/src/plugins/sensors/android/src/androidjnisensors.cpp
@@ -247,6 +247,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;
diff --git a/src/plugins/sensors/dummy/dummy.pro b/src/plugins/sensors/dummy/dummy.pro
index b4ef2fd..6eab491 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
diff --git a/src/plugins/sensors/simulator/simulatoraccelerometer.cpp b/src/plugins/sensors/simulator/simulatoraccelerometer.cpp
index 9d2c929..481128f 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 fa6f487..177684f 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 a64f3a1..fc68c51 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 0259437..4499128 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 bdcfadf..40d9edb 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 c3f2c8a..64a3177 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 74a35f6..b443095 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) {