summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Vuolle <juha.vuolle@insta.fi>2021-06-22 16:20:43 +0300
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-06-29 08:46:48 +0000
commitcf9bde07bf104459f433e18f1ef1e75cd66fcf1f (patch)
tree43449164364bcee9c8f90e24ff256080e185005f
parentcb4adddcd0e322c527b307dbf6e353fcf1d69a6a (diff)
Update QtSensors platform- and sensor support in Qt6
This commit removes the sensor frontend implementations of QAltimeter, QDistanceSensor, QHolsterSensor and their QML counterparts. Since the BlackBerry backend removal in 2015 these sensors have not had a backend support. Sensorfw is not currently supported by Qt6, and as the sole backend provider the following sensors have been removed from documentation until such support is reintroduced: QIRProximitySensor, QLidSensor, QTapSensor and their QML counterparts. [ChangeLog][QAltimeter] Remove support [ChangeLog][QDistanceSensor] Remove support [ChangeLog][QHolsterSensor] Remove support [ChangeLog][QIRProximitySensor] Disable documentation [ChangeLog][QLidSensor] Disable documentation [ChangeLog][QTapSensor] Disable documentation Task-number: QTBUG-92512 Change-Id: Ic89e91bf65e7a70a2faf0fb566bb24f2f1005a4e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit d40c4d0b3766043cf4fbaa87acd76b11bf733369) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/sensors/CMakeLists.txt9
-rw-r--r--src/sensors/doc/src/compatmap.qdoc67
-rw-r--r--src/sensors/doc/src/qt6-changes.qdoc11
-rw-r--r--src/sensors/qaltimeter.cpp151
-rw-r--r--src/sensors/qaltimeter.h81
-rw-r--r--src/sensors/qaltimeter_p.h68
-rw-r--r--src/sensors/qdistancesensor.cpp163
-rw-r--r--src/sensors/qdistancesensor.h82
-rw-r--r--src/sensors/qdistancesensor_p.h75
-rw-r--r--src/sensors/qholstersensor.cpp157
-rw-r--r--src/sensors/qholstersensor.h81
-rw-r--r--src/sensors/qholstersensor_p.h68
-rw-r--r--src/sensors/qirproximitysensor.cpp3
-rw-r--r--src/sensors/qlidsensor.cpp3
-rw-r--r--src/sensors/qtapsensor.cpp3
-rw-r--r--src/sensorsquick/CMakeLists.txt3
-rw-r--r--src/sensorsquick/qmlaltimeter.cpp130
-rw-r--r--src/sensorsquick/qmlaltimeter_p.h103
-rw-r--r--src/sensorsquick/qmldistancesensor.cpp132
-rw-r--r--src/sensorsquick/qmldistancesensor_p.h104
-rw-r--r--src/sensorsquick/qmlholstersensor.cpp131
-rw-r--r--src/sensorsquick/qmlholstersensor_p.h104
-rw-r--r--src/sensorsquick/qmlirproximitysensor.cpp2
-rw-r--r--src/sensorsquick/qmllidsensor.cpp2
-rw-r--r--src/sensorsquick/qmltapsensor.cpp2
-rw-r--r--tests/auto/common/test_backends.cpp12
-rw-r--r--tests/auto/common/test_backends.h12
-rw-r--r--tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp12
-rw-r--r--tests/auto/qml/qml_quick/tst_sensors_basic.qml3
-rw-r--r--tests/auto/qsensor/tst_qsensor.cpp8
30 files changed, 28 insertions, 1754 deletions
diff --git a/src/sensors/CMakeLists.txt b/src/sensors/CMakeLists.txt
index 4a687b48..9b33c372 100644
--- a/src/sensors/CMakeLists.txt
+++ b/src/sensors/CMakeLists.txt
@@ -17,12 +17,9 @@ qt_internal_add_module(Sensors
sensorlog_p.h
qsensor.h
qaccelerometer.h
- qaltimeter.h
qambientlightsensor.h
qambienttemperaturesensor.h
qcompass.h
- qdistancesensor.h
- qholstersensor.h
qlightsensor.h
qmagnetometer.h
qorientationsensor.h
@@ -37,12 +34,9 @@ qt_internal_add_module(Sensors
qlidsensor.h
qsensor_p.h
qaccelerometer_p.h
- qaltimeter_p.h
qambientlightsensor_p.h
qambienttemperaturesensor_p.h
qcompass_p.h
- qdistancesensor_p.h
- qholstersensor_p.h
qlightsensor_p.h
qmagnetometer_p.h
qorientationsensor_p.h
@@ -57,12 +51,9 @@ qt_internal_add_module(Sensors
qlidsensor_p.h
qsensor.cpp
qaccelerometer.cpp
- qaltimeter.cpp
qambientlightsensor.cpp
qambienttemperaturesensor.cpp
qcompass.cpp
- qdistancesensor.cpp
- qholstersensor.cpp
qlightsensor.cpp
qmagnetometer.cpp
qorientationsensor.cpp
diff --git a/src/sensors/doc/src/compatmap.qdoc b/src/sensors/doc/src/compatmap.qdoc
index 4f3bb8d4..a8ba2fcd 100644
--- a/src/sensors/doc/src/compatmap.qdoc
+++ b/src/sensors/doc/src/compatmap.qdoc
@@ -40,11 +40,11 @@
</tr>
<tr>
<td bgcolor="green"></td>
- <td>The feature is fully supported.</td>
+ <td>The sensor is supported.</td>
</tr>
<tr>
<td bgcolor="gray"></td>
- <td>The feature is not supported.</td>
+ <td>The sensor is not supported.</td>
</tr>
</tbody>
</table>
@@ -70,15 +70,6 @@
<td bgcolor="green"></td>
</tr>
<tr>
- <td nowrap="nowrap">Altimeter</td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- </tr>
- <tr>
<td nowrap="nowrap">Ambient Light Sensor</td>
<td bgcolor="gray"></td>
<td bgcolor="gray"></td>
@@ -106,15 +97,6 @@
<td bgcolor="gray"></td>
</tr>
<tr>
- <td nowrap="nowrap">Distance</td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- </tr>
- <tr>
<td nowrap="nowrap">Gyroscope</td>
<td bgcolor="green"></td>
<td bgcolor="gray"></td>
@@ -124,15 +106,6 @@
<td bgcolor="green"></td>
</tr>
<tr>
- <td nowrap="nowrap">Holster Sensor</td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- </tr>
- <tr>
<td nowrap="nowrap">Humidity Sensor</td>
<td bgcolor="gray"></td>
<td bgcolor="gray"></td>
@@ -142,24 +115,6 @@
<td bgcolor="green"></td>
</tr>
<tr>
- <td nowrap="nowrap">IR Proximity Sensor</td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- </tr>
- <tr>
- <td nowrap="nowrap">Lid Sensor</td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- </tr>
- <tr>
<td nowrap="nowrap">Light Sensor</td>
<td bgcolor="green"></td>
<td bgcolor="green"></td>
@@ -214,15 +169,6 @@
<td bgcolor="gray"></td>
</tr>
<tr>
- <td nowrap="nowrap">Tap Sensor</td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- </tr>
- <tr>
<td nowrap="nowrap">Tilt Sensor</td>
<td bgcolor="gray"></td>
<td bgcolor="gray"></td>
@@ -231,15 +177,6 @@
<td bgcolor="green"></td>
<td bgcolor="gray"></td>
</tr>
- <tr>
- <td nowrap="nowrap">Sensor Gestures</td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- <td bgcolor="gray"></td>
- </tr>
</table>
\endraw
diff --git a/src/sensors/doc/src/qt6-changes.qdoc b/src/sensors/doc/src/qt6-changes.qdoc
index 9cce19d4..4b4d2585 100644
--- a/src/sensors/doc/src/qt6-changes.qdoc
+++ b/src/sensors/doc/src/qt6-changes.qdoc
@@ -49,9 +49,20 @@
\section2 sensorfw
+ \section2 sensorfw
+
The \l {https://git.sailfishos.org/mer-core/sensorfw}{sensorfw} does not yet have
a Qt 6 port and is therefore not yet supported by sensors in Qt 6.
+ \section2 Removed sensors
+
+ QAltimeter, QDistanceSensor, QHolsterSensor and their QML counterparts
+ did no longer have a backend implementation and have been removed.
+
+ QIRProximitySensor, QLidSensor, and QTapSensor have only sensorfw
+ backend, and as such they are not currently listed as supported sensor
+ types.
+
\section1 API changes
\section2 Deleted typedef for qtimestamp
diff --git a/src/sensors/qaltimeter.cpp b/src/sensors/qaltimeter.cpp
deleted file mode 100644
index ddac14e0..00000000
--- a/src/sensors/qaltimeter.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qaltimeter.h>
-#include "qaltimeter_p.h"
-
-QT_BEGIN_NAMESPACE
-
-IMPLEMENT_READING(QAltimeterReading)
-
-/*!
- \class QAltimeterReading
- \ingroup sensors_reading
- \inmodule QtSensors
- \since 5.1
-
- \brief The QAltimeterReading class holds readings from the altimeter sensor.
-
- The altitude is reported in meters relative to mean sea level.
-*/
-
-/*!
- \property QAltimeterReading::altitude
- \brief The altitude in meters relative to mean sea level.
-*/
-
-qreal QAltimeterReading::altitude() const
-{
- return d->altitude;
-}
-
-/*!
- Sets the altitude to \a altitude.
-*/
-void QAltimeterReading::setAltitude(qreal altitude)
-{
- d->altitude = altitude;
-}
-
-// =====================================================================
-
-/*!
- \class QAltimeterFilter
- \ingroup sensors_filter
- \inmodule QtSensors
- \since 5.1
-
- \brief The QAltimeterFilter class is a convenience wrapper around QSensorFilter.
-
- The only difference is that the filter() method features a pointer to QAltimeterReading
- instead of QSensorReading.
-*/
-
-/*!
- \fn QAltimeterFilter::filter(QAltimeterReading *reading)
-
- Called when \a reading changes. Returns false to prevent the reading from propagating.
-
- \sa QSensorFilter::filter()
-*/
-
-bool QAltimeterFilter::filter(QSensorReading *reading)
-{
- return filter(static_cast<QAltimeterReading*>(reading));
-}
-
-char const * const QAltimeter::sensorType("QAltimeter");
-
-/*!
- \class QAltimeter
- \ingroup sensors_type
- \inmodule QtSensors
- \since 5.1
-
- \brief The QAltimeter class is a convenience wrapper around QSensor.
-
- The only behavioural difference is that this class sets the type properly.
-
- This class also features a reading() function that returns a QAltimeterReading instead of a QSensorReading.
-
- For details about how the sensor works, see \l QAltimeterReading.
-
- \sa QAltimeterReading
-*/
-
-/*!
- Construct the sensor as a child of \a parent.
-*/
-QAltimeter::QAltimeter(QObject *parent)
- : QSensor(QAltimeter::sensorType, parent)
-{
-}
-
-/*!
- Destroy the sensor. Stops the sensor if it has not already been stopped.
-*/
-QAltimeter::~QAltimeter()
-{
-}
-
-/*!
- \fn QAltimeter::reading() const
-
- Returns the reading class for this sensor.
-
- \sa QSensor::reading()
-*/
-
-QAltimeterReading *QAltimeter::reading() const
-{
- return static_cast<QAltimeterReading*>(QSensor::reading());
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qaltimeter.cpp"
diff --git a/src/sensors/qaltimeter.h b/src/sensors/qaltimeter.h
deleted file mode 100644
index e62ce344..00000000
--- a/src/sensors/qaltimeter.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QALTIMETER_H
-#define QALTIMETER_H
-
-#include <QtSensors/qsensor.h>
-
-QT_BEGIN_NAMESPACE
-
-class QAltimeterReadingPrivate;
-
-class Q_SENSORS_EXPORT QAltimeterReading : public QSensorReading
-{
- Q_OBJECT
- Q_PROPERTY(qreal altitude READ altitude)
- DECLARE_READING(QAltimeterReading)
-public:
- qreal altitude() const;
- void setAltitude(qreal altitude);
-};
-
-class Q_SENSORS_EXPORT QAltimeterFilter : public QSensorFilter
-{
-public:
- virtual bool filter(QAltimeterReading *reading) = 0;
-private:
- bool filter(QSensorReading *reading) override;
-};
-
-class Q_SENSORS_EXPORT QAltimeter : public QSensor
-{
- Q_OBJECT
-public:
- explicit QAltimeter(QObject *parent = nullptr);
- ~QAltimeter();
- QAltimeterReading *reading() const;
- static char const * const sensorType;
-
-private:
- Q_DISABLE_COPY(QAltimeter)
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/sensors/qaltimeter_p.h b/src/sensors/qaltimeter_p.h
deleted file mode 100644
index b1231c24..00000000
--- a/src/sensors/qaltimeter_p.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QALTIMETER_P_H
-#define QALTIMETER_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-QT_BEGIN_NAMESPACE
-
-class QAltimeterReadingPrivate
-{
-public:
- QAltimeterReadingPrivate()
- : altitude(0)
- {
- }
-
- qreal altitude;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/sensors/qdistancesensor.cpp b/src/sensors/qdistancesensor.cpp
deleted file mode 100644
index 3b778b90..00000000
--- a/src/sensors/qdistancesensor.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
- /****************************************************************************
- **
- ** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
- ** Contact: https://www.qt.io/licensing/
- **
- ** This file is part of the QtSensors module of the Qt Toolkit.
- **
- ** $QT_BEGIN_LICENSE:LGPL$
- ** Commercial License Usage
- ** Licensees holding valid commercial Qt licenses may use this file in
- ** accordance with the commercial license agreement provided with the
- ** Software or, alternatively, in accordance with the terms contained in
- ** a written agreement between you and The Qt Company. For licensing terms
- ** and conditions see https://www.qt.io/terms-conditions. For further
- ** information use the contact form at https://www.qt.io/contact-us.
- **
- ** GNU Lesser General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU Lesser
- ** General Public License version 3 as published by the Free Software
- ** Foundation and appearing in the file LICENSE.LGPL3 included in the
- ** packaging of this file. Please review the following information to
- ** ensure the GNU Lesser General Public License version 3 requirements
- ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
- **
- ** GNU General Public License Usage
- ** Alternatively, this file may be used under the terms of the GNU
- ** General Public License version 2.0 or (at your option) the GNU General
- ** Public license version 3 or any later version approved by the KDE Free
- ** Qt Foundation. The licenses are as published by the Free Software
- ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
- ** included in the packaging of this file. Please review the following
- ** information to ensure the GNU General Public License requirements will
- ** be met: https://www.gnu.org/licenses/gpl-2.0.html and
- ** https://www.gnu.org/licenses/gpl-3.0.html.
- **
- ** $QT_END_LICENSE$
- **
- ****************************************************************************/
-
-#include <qdistancesensor.h>
-#include "qdistancesensor_p.h"
-
-QT_BEGIN_NAMESPACE
-
-IMPLEMENT_READING(QDistanceReading)
-
-/*!
- \class QDistanceReading
- \ingroup sensors_reading
- \inmodule QtSensors
- \since 5.4
-
- \brief The QDistanceReading class holds distance reading in cm from the proximity sensor.
-
- The QDistanceReading class holds distance reading in cm from the proximity sensor.
- Note: Some proximity sensor only support two values for distance, a near and far value.
- In this case, the sensor should report its maximum range value to represent the far state,
- and a lesser value to represent the near state.
-
- \section2 QDistanceReading Units
- The distance is measured in cm
-
- The distance sensor is typically located in the front face of a device, and thus will
- measure the distance of an object from the device's front face.
-*/
-
-/*!
- \property QDistanceReading::distance
- \brief distance of object from front face of device
-
- \sa {QDistanceReading Units}
-*/
-
-qreal QDistanceReading::distance() const
-{
- return d->distance;
-}
-
-/*!
- Sets distance to \a distance.
-*/
-void QDistanceReading::setDistance(qreal distance)
-{
- d->distance = distance;
-}
-
-// =====================================================================
-
-/*!
- \class QDistanceFilter
- \ingroup sensors_filter
- \inmodule QtSensors
- \since 5.4
-
- \brief The QDistanceFilter class is a convenience wrapper around QSensorFilter.
-
- The only difference is that the filter() method features a pointer to QDistanceReading
- instead of QSensorReading.
-*/
-
-/*!
- \fn QDistanceFilter::filter(QDistanceReading *reading)
-
- Called when \a reading changes. Returns false to prevent the reading from propagating.
-
- \sa QSensorFilter::filter()
-*/
-
-bool QDistanceFilter::filter(QSensorReading *reading)
-{
- return filter(static_cast<QDistanceReading*>(reading));
-}
-
-char const * const QDistanceSensor::sensorType("QDistanceSensor");
-
-/*!
- \class QDistanceSensor
- \ingroup sensors_type
- \inmodule QtSensors
- \since 5.4
-
- \brief The QDistanceSensor class is a convenience wrapper around QSensor.
-
- The only behavioral difference is that this class sets the type properly.
-
- This class also features a reading() function that returns a QDistanceReading instead of a QSensorReading.
-
- For details about how the sensor works, see \l QDistanceReading.
-
- \sa QDistanceReading
-*/
-
-/*!
- Construct the sensor as a child of \a parent.
-*/
-QDistanceSensor::QDistanceSensor(QObject *parent)
- : QSensor(QDistanceSensor::sensorType, parent)
-{
-}
-
-/*!
- Destroy the sensor. Stops the sensor if it has not already been stopped.
-*/
-QDistanceSensor::~QDistanceSensor()
-{
-}
-
-/*!
- \fn QDistanceSensor::reading() const
-
- Returns the reading class for this sensor.
-
- \sa QSensor::reading()
-*/
-
-QDistanceReading *QDistanceSensor::reading() const
-{
- return static_cast<QDistanceReading*>(QSensor::reading());
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qdistancesensor.cpp"
diff --git a/src/sensors/qdistancesensor.h b/src/sensors/qdistancesensor.h
deleted file mode 100644
index b50c0942..00000000
--- a/src/sensors/qdistancesensor.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDISTANCESENSOR_H
-#define QDISTANCESENSOR_H
-
-#include <QtSensors/qsensor.h>
-
-QT_BEGIN_NAMESPACE
-
-class QDistanceReadingPrivate;
-
-class Q_SENSORS_EXPORT QDistanceReading : public QSensorReading
-{
- Q_OBJECT
- Q_PROPERTY(qreal distance READ distance)
- DECLARE_READING(QDistanceReading)
-public:
- qreal distance() const;
- void setDistance(qreal distance);
-};
-
-class Q_SENSORS_EXPORT QDistanceFilter : public QSensorFilter
-{
-public:
- virtual bool filter(QDistanceReading *reading) = 0;
-private:
- bool filter(QSensorReading *reading) override;
-};
-
-class Q_SENSORS_EXPORT QDistanceSensor : public QSensor
-{
- Q_OBJECT
-public:
- explicit QDistanceSensor(QObject *parent = nullptr);
- ~QDistanceSensor();
- QDistanceReading *reading() const;
- static char const * const sensorType;
-
-private:
- Q_DISABLE_COPY(QDistanceSensor)
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/sensors/qdistancesensor_p.h b/src/sensors/qdistancesensor_p.h
deleted file mode 100644
index 262fdb1e..00000000
--- a/src/sensors/qdistancesensor_p.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QDISTANCESENSOR_P_H
-#define QDISTANCESENSOR_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-QT_BEGIN_NAMESPACE
-
-class QDistanceReadingPrivate
-{
-public:
- QDistanceReadingPrivate()
- : distance(0.0)
- {
- }
-
- /*
- * Note that this class is copied so you may need to implement
- * a copy constructor if you have complex types or pointers
- * as values.
- */
-
- qreal distance;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/sensors/qholstersensor.cpp b/src/sensors/qholstersensor.cpp
deleted file mode 100644
index 19a2b3c9..00000000
--- a/src/sensors/qholstersensor.cpp
+++ /dev/null
@@ -1,157 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qholstersensor.h>
-#include "qholstersensor_p.h"
-
-QT_BEGIN_NAMESPACE
-
-IMPLEMENT_READING(QHolsterReading)
-
-/*!
- \class QHolsterReading
- \ingroup sensors_reading
- \inmodule QtSensors
- \since 5.1
-
- \brief The QHolsterReading class holds readings from the holster sensor.
-
- \section2 QHolsterReading Units
- The holster sensor can detect if a device is holstered or not. A holster is a pocket,
- similar to a gun holster, specifically made for the device. If the device is inside of this
- pocket, it is holstered. The holster supports the device in detecting whether the device is
- holstered or not.
-*/
-
-/*!
- \property QHolsterReading::holstered
- \brief A value indicating whether the device is holstered.
-
- \sa {QHolsterReading Units}
-*/
-
-bool QHolsterReading::holstered() const
-{
- return d->holstered;
-}
-
-/*!
- Sets the holstered value to \a holstered.
-*/
-void QHolsterReading::setHolstered(bool holstered)
-{
- d->holstered = holstered;
-}
-
-// =====================================================================
-
-/*!
- \class QHolsterFilter
- \ingroup sensors_filter
- \inmodule QtSensors
- \since 5.1
-
- \brief The QHolsterFilter class is a convenience wrapper around QSensorFilter.
-
- The only difference is that the filter() method features a pointer to QHolsterReading
- instead of QSensorReading.
-*/
-
-/*!
- \fn QHolsterFilter::filter(QHolsterReading *reading)
-
- Called when \a reading changes. Returns false to prevent the reading from propagating.
-
- \sa QSensorFilter::filter()
-*/
-
-bool QHolsterFilter::filter(QSensorReading *reading)
-{
- return filter(static_cast<QHolsterReading*>(reading));
-}
-
-char const * const QHolsterSensor::sensorType("QHolsterSensor");
-
-/*!
- \class QHolsterSensor
- \ingroup sensors_type
- \inmodule QtSensors
- \since 5.1
-
- \brief The QHolsterSensor class is a convenience wrapper around QSensor.
-
- The only behavioural difference is that this class sets the type properly.
-
- This class also features a reading() function that returns a QHolsterReading instead of a QSensorReading.
-
- For details about how the sensor works, see \l QHolsterReading.
-
- \sa QHolsterReading
-*/
-
-/*!
- Construct the sensor as a child of \a parent.
-*/
-QHolsterSensor::QHolsterSensor(QObject *parent)
- : QSensor(QHolsterSensor::sensorType, parent)
-{
-}
-
-/*!
- Destroy the sensor. Stops the sensor if it has not already been stopped.
-*/
-QHolsterSensor::~QHolsterSensor()
-{
-}
-
-/*!
- \fn QHolsterSensor::reading() const
-
- Returns the reading class for this sensor.
-
- \sa QSensor::reading()
-*/
-
-QHolsterReading *QHolsterSensor::reading() const
-{
- return static_cast<QHolsterReading*>(QSensor::reading());
-}
-
-QT_END_NAMESPACE
-
-#include "moc_qholstersensor.cpp"
diff --git a/src/sensors/qholstersensor.h b/src/sensors/qholstersensor.h
deleted file mode 100644
index 586e31b4..00000000
--- a/src/sensors/qholstersensor.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QHOLSTERSENSOR_H
-#define QHOLSTERSENSOR_H
-
-#include <QtSensors/qsensor.h>
-
-QT_BEGIN_NAMESPACE
-
-class QHolsterReadingPrivate;
-
-class Q_SENSORS_EXPORT QHolsterReading : public QSensorReading
-{
- Q_OBJECT
- Q_PROPERTY(bool holstered READ holstered)
- DECLARE_READING(QHolsterReading)
-public:
- bool holstered() const;
- void setHolstered(bool holstered);
-};
-
-class Q_SENSORS_EXPORT QHolsterFilter : public QSensorFilter
-{
-public:
- virtual bool filter(QHolsterReading *reading) = 0;
-private:
- bool filter(QSensorReading *reading) override;
-};
-
-class Q_SENSORS_EXPORT QHolsterSensor : public QSensor
-{
- Q_OBJECT
-public:
- explicit QHolsterSensor(QObject *parent = nullptr);
- ~QHolsterSensor();
- QHolsterReading *reading() const;
- static char const * const sensorType;
-
-private:
- Q_DISABLE_COPY(QHolsterSensor)
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/sensors/qholstersensor_p.h b/src/sensors/qholstersensor_p.h
deleted file mode 100644
index 3d8b9801..00000000
--- a/src/sensors/qholstersensor_p.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QHOLSTERSENSOR_P_H
-#define QHOLSTERSENSOR_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-QT_BEGIN_NAMESPACE
-
-class QHolsterReadingPrivate
-{
-public:
- QHolsterReadingPrivate()
- : holstered(false)
- {
- }
-
- bool holstered;
-};
-
-QT_END_NAMESPACE
-
-#endif
diff --git a/src/sensors/qirproximitysensor.cpp b/src/sensors/qirproximitysensor.cpp
index 85c8347e..ae3dfaf1 100644
--- a/src/sensors/qirproximitysensor.cpp
+++ b/src/sensors/qirproximitysensor.cpp
@@ -49,6 +49,7 @@ IMPLEMENT_READING(QIRProximityReading)
\ingroup sensors_reading
\inmodule QtSensors
\since 5.1
+ \internal
\brief The QIRProximityReading class holds readings from the IR proximity sensor.
@@ -101,6 +102,7 @@ void QIRProximityReading::setReflectance(qreal reflectance)
\ingroup sensors_filter
\inmodule QtSensors
\since 5.1
+ \internal
\brief The QIRProximityFilter class is a convenience wrapper around QSensorFilter.
@@ -128,6 +130,7 @@ char const * const QIRProximitySensor::sensorType("QIRProximitySensor");
\ingroup sensors_type
\inmodule QtSensors
\since 5.1
+ \internal
\brief The QIRProximitySensor class is a convenience wrapper around QSensor.
diff --git a/src/sensors/qlidsensor.cpp b/src/sensors/qlidsensor.cpp
index d46daa49..6fb88e36 100644
--- a/src/sensors/qlidsensor.cpp
+++ b/src/sensors/qlidsensor.cpp
@@ -48,6 +48,7 @@ IMPLEMENT_READING(QLidReading)
\ingroup sensors_reading
\inmodule QtSensors
\since 5.9
+ \internal
\brief The QLidReading class holds readings from the Lid sensor.
@@ -110,6 +111,7 @@ void QLidReading::setFrontLidClosed(bool closed)
\ingroup sensors_filter
\inmodule QtSensors
\since 5.9
+ \internal
\brief The QLidFilter class is a convenience wrapper around QSensorFilter.
@@ -137,6 +139,7 @@ char const * const QLidSensor::sensorType("QLidSensor");
\ingroup sensors_type
\inmodule QtSensors
\since 5.9
+ \internal
\brief The QLidSensor class is a convenience wrapper around QSensor.
diff --git a/src/sensors/qtapsensor.cpp b/src/sensors/qtapsensor.cpp
index dbfcbaa2..a0df3cd3 100644
--- a/src/sensors/qtapsensor.cpp
+++ b/src/sensors/qtapsensor.cpp
@@ -49,6 +49,7 @@ IMPLEMENT_READING(QTapReading)
\ingroup sensors_reading
\inmodule QtSensors
\since 5.1
+ \internal
\brief The QTapReading class represents one reading from the
tap sensor.
@@ -174,6 +175,7 @@ void QTapReading::setDoubleTap(bool doubleTap)
\ingroup sensors_filter
\inmodule QtSensors
\since 5.1
+ \internal
\brief The QTapFilter class is a convenience wrapper around QSensorFilter.
@@ -201,6 +203,7 @@ char const * const QTapSensor::sensorType("QTapSensor");
\ingroup sensors_type
\inmodule QtSensors
\since 5.1
+ \internal
\brief The QTapSensor class is a convenience wrapper around QSensor.
diff --git a/src/sensorsquick/CMakeLists.txt b/src/sensorsquick/CMakeLists.txt
index 87a951a5..04a2bc2f 100644
--- a/src/sensorsquick/CMakeLists.txt
+++ b/src/sensorsquick/CMakeLists.txt
@@ -3,13 +3,10 @@ qt_internal_add_qml_module(SensorsQuick
VERSION "${PROJECT_VERSION}"
SOURCES
qmlaccelerometer.cpp qmlaccelerometer_p.h
- qmlaltimeter.cpp qmlaltimeter_p.h
qmlambientlightsensor.cpp qmlambientlightsensor_p.h
qmlambienttemperaturesensor.cpp qmlambienttemperaturesensor_p.h
qmlcompass.cpp qmlcompass_p.h
- qmldistancesensor.cpp qmldistancesensor_p.h
qmlgyroscope.cpp qmlgyroscope_p.h
- qmlholstersensor.cpp qmlholstersensor_p.h
qmlhumiditysensor.cpp qmlhumiditysensor_p.h
qmlirproximitysensor.cpp qmlirproximitysensor_p.h
qmllidsensor.cpp qmllidsensor_p.h
diff --git a/src/sensorsquick/qmlaltimeter.cpp b/src/sensorsquick/qmlaltimeter.cpp
deleted file mode 100644
index 2c80c365..00000000
--- a/src/sensorsquick/qmlaltimeter.cpp
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "qmlaltimeter_p.h"
-#include <QtSensors/QAltimeter>
-
-/*!
- \qmltype Altimeter
- \instantiates QmlAltimeter
- \ingroup qml-sensors_type
- \inqmlmodule QtSensors
- \since QtSensors 5.1
- \inherits Sensor
- \brief The Altimeter element reports on altitude.
-
- The Altimeter element reports on altitude.
-
- This element wraps the QAltimeter class. Please see the documentation for
- QAltimeter for details.
-
- \sa AltimeterReading
-*/
-
-QmlAltimeter::QmlAltimeter(QObject *parent)
- : QmlSensor(parent)
- , m_sensor(new QAltimeter(this))
-{
-}
-
-QmlAltimeter::~QmlAltimeter()
-{
-}
-
-QmlSensorReading *QmlAltimeter::createReading() const
-{
- return new QmlAltimeterReading(m_sensor);
-}
-
-QSensor *QmlAltimeter::sensor() const
-{
- return m_sensor;
-}
-
-/*!
- \qmltype AltimeterReading
- \instantiates QmlAltimeterReading
- \ingroup qml-sensors_reading
- \inqmlmodule QtSensors
- \since QtSensors 5.1
- \inherits SensorReading
- \brief The AltimeterReading element holds the most recent Altimeter reading.
-
- The AltimeterReading element holds the most recent Altimeter reading.
-
- This element wraps the QAltimeterReading class. Please see the documentation for
- QAltimeterReading for details.
-
- This element cannot be directly created.
-*/
-
-QmlAltimeterReading::QmlAltimeterReading(QAltimeter *sensor)
- : m_sensor(sensor)
-{
-}
-
-QmlAltimeterReading::~QmlAltimeterReading()
-{
-}
-
-/*!
- \qmlproperty qreal AltimeterReading::altitude
- This property holds the altitude of the device.
-
- Please see QAltimeterReading::altitude for information about this property.
-*/
-
-qreal QmlAltimeterReading::altitude() const
-{
- return m_altitude;
-}
-
-QBindable<qreal> QmlAltimeterReading::bindableAltitude() const
-{
- return &m_altitude;
-}
-
-QSensorReading *QmlAltimeterReading::reading() const
-{
- return m_sensor->reading();
-}
-
-void QmlAltimeterReading::readingUpdate()
-{
- m_altitude = m_sensor->reading()->altitude();
-}
diff --git a/src/sensorsquick/qmlaltimeter_p.h b/src/sensorsquick/qmlaltimeter_p.h
deleted file mode 100644
index 19f124cb..00000000
--- a/src/sensorsquick/qmlaltimeter_p.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QMLALTIMETER_P_H
-#define QMLALTIMETER_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qmlsensor_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QAltimeter;
-
-class Q_SENSORSQUICK_PRIVATE_EXPORT QmlAltimeter : public QmlSensor
-{
- Q_OBJECT
- QML_NAMED_ELEMENT(Altimeter)
- QML_ADDED_IN_VERSION(5,1)
-public:
- explicit QmlAltimeter(QObject *parent = 0);
- ~QmlAltimeter();
-
- QSensor *sensor() const override;
-
-private:
- QmlSensorReading *createReading() const override;
- QAltimeter *m_sensor;
-};
-
-class Q_SENSORSQUICK_PRIVATE_EXPORT QmlAltimeterReading : public QmlSensorReading
-{
- Q_OBJECT
- Q_PROPERTY(qreal altitude READ altitude
- NOTIFY altitudeChanged BINDABLE bindableAltitude)
- QML_NAMED_ELEMENT(AltimeterReading)
- QML_UNCREATABLE("Cannot create AltimeterReading")
- QML_ADDED_IN_VERSION(5,1)
-public:
- explicit QmlAltimeterReading(QAltimeter *sensor);
- ~QmlAltimeterReading();
-
- qreal altitude() const;
- QBindable<qreal> bindableAltitude() const;
-
-Q_SIGNALS:
- void altitudeChanged();
-
-private:
- QSensorReading *reading() const override;
- void readingUpdate() override;
-
- QAltimeter *m_sensor;
- Q_OBJECT_BINDABLE_PROPERTY(QmlAltimeterReading, qreal,
- m_altitude, &QmlAltimeterReading::altitudeChanged)
-};
-
-QT_END_NAMESPACE
-#endif
diff --git a/src/sensorsquick/qmldistancesensor.cpp b/src/sensorsquick/qmldistancesensor.cpp
deleted file mode 100644
index a779fbb2..00000000
--- a/src/sensorsquick/qmldistancesensor.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "qmldistancesensor_p.h"
-#include <QDistanceSensor>
-
-/*!
- \qmltype DistanceSensor
- \instantiates QmlDistanceSensor
- \ingroup qml-sensors_type
- \inqmlmodule QtSensors
- \since QtSensors 5.4
- \inherits Sensor
- \brief The DistanceSensor element reports the distance in cm from an object to the device.
-
- The DistanceSensor element reports the distance in cm from an object to the device.
-
- This element wraps the QDistanceSensor class. Please see the documentation for
- QDistanceSensor for details.
-
- \sa DistanceReading
-*/
-
-QmlDistanceSensor::QmlDistanceSensor(QObject *parent)
- : QmlSensor(parent)
- , m_sensor(new QDistanceSensor(this))
-{
-}
-
-QmlDistanceSensor::~QmlDistanceSensor()
-{
-}
-
-QmlSensorReading *QmlDistanceSensor::createReading() const
-{
- return new QmlDistanceReading(m_sensor);
-}
-
-QSensor *QmlDistanceSensor::sensor() const
-{
- return m_sensor;
-}
-
-/*!
- \qmltype DistanceReading
- \instantiates QmlDistanceReading
- \ingroup qml-sensors_reading
- \inqmlmodule QtSensors
- \since QtSensors 5.4
- \inherits SensorReading
- \brief The DistanceReading element holds the most recent DistanceSensor reading.
-
- The DistanceReading element holds the most recent DistanceSensor reading.
-
- This element wraps the QDistanceReading class. Please see the documentation for
- QDistanceReading for details.
-
- This element cannot be directly created.
-*/
-
-QmlDistanceReading::QmlDistanceReading(QDistanceSensor *sensor)
- : m_sensor(sensor)
- , m_distance(0.0)
-{
-}
-
-QmlDistanceReading::~QmlDistanceReading()
-{
-}
-
-/*!
- \qmlproperty qreal DistanceReading::distance
- This property holds the distance measurement
-
- Please see QDistanceReading::distance for information about this property.
-*/
-
-qreal QmlDistanceReading::distance() const
-{
- return m_distance;
-}
-
-QBindable<qreal> QmlDistanceReading::bindableDistance() const
-{
- return &m_distance;
-}
-
-
-QSensorReading *QmlDistanceReading::reading() const
-{
- return m_sensor->reading();
-}
-
-void QmlDistanceReading::readingUpdate()
-{
- m_distance = m_sensor->reading()->distance();
-}
diff --git a/src/sensorsquick/qmldistancesensor_p.h b/src/sensorsquick/qmldistancesensor_p.h
deleted file mode 100644
index 9692a997..00000000
--- a/src/sensorsquick/qmldistancesensor_p.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 BlackBerry Limited. All rights reserved.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QMLDISTANCESENSOR_P_H
-#define QMLDISTANCESENSOR_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qmlsensor_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QDistanceSensor;
-
-class Q_SENSORSQUICK_PRIVATE_EXPORT QmlDistanceSensor : public QmlSensor
-{
- Q_OBJECT
- QML_NAMED_ELEMENT(DistanceSensor)
- QML_ADDED_IN_VERSION(5,4)
-public:
- explicit QmlDistanceSensor(QObject *parent = 0);
- ~QmlDistanceSensor();
-
- QSensor *sensor() const override;
-
-private:
- QmlSensorReading *createReading() const override;
-
- QDistanceSensor *m_sensor;
-};
-
-class Q_SENSORSQUICK_PRIVATE_EXPORT QmlDistanceReading : public QmlSensorReading
-{
- Q_OBJECT
- Q_PROPERTY(qreal distance READ distance NOTIFY distanceChanged BINDABLE bindableDistance)
- QML_NAMED_ELEMENT(DistanceReading)
- QML_UNCREATABLE("Cannot create DistanceReading")
- QML_ADDED_IN_VERSION(5,4)
-public:
- explicit QmlDistanceReading(QDistanceSensor *sensor);
- ~QmlDistanceReading();
-
- qreal distance() const;
- QBindable<qreal> bindableDistance() const;
-
-Q_SIGNALS:
- void distanceChanged();
-
-private:
- QSensorReading *reading() const override;
- void readingUpdate() override;
-
- QDistanceSensor *m_sensor;
- Q_OBJECT_BINDABLE_PROPERTY(QmlDistanceReading, qreal,
- m_distance, &QmlDistanceReading::distanceChanged)
-};
-
-QT_END_NAMESPACE
-#endif
diff --git a/src/sensorsquick/qmlholstersensor.cpp b/src/sensorsquick/qmlholstersensor.cpp
deleted file mode 100644
index b8b28b32..00000000
--- a/src/sensorsquick/qmlholstersensor.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "qmlholstersensor_p.h"
-#include <QtSensors/QHolsterSensor>
-
-/*!
- \qmltype HolsterSensor
- \instantiates QmlHolsterSensor
- \ingroup qml-sensors_type
- \inqmlmodule QtSensors
- \since QtSensors 5.1
- \inherits Sensor
- \brief The HolsterSensor element reports on whether a device is holstered.
-
- The HolsterSensor element reports on whether a device is holstered.
-
- This element wraps the QHolsterSensor class. Please see the documentation for
- QHolsterSensor for details.
-
- \sa HolsterReading
-*/
-
-QmlHolsterSensor::QmlHolsterSensor(QObject *parent)
- : QmlSensor(parent)
- , m_sensor(new QHolsterSensor(this))
-{
-}
-
-QmlHolsterSensor::~QmlHolsterSensor()
-{
-}
-
-QmlSensorReading *QmlHolsterSensor::createReading() const
-{
- return new QmlHolsterReading(m_sensor);
-}
-
-QSensor *QmlHolsterSensor::sensor() const
-{
- return m_sensor;
-}
-
-/*!
- \qmltype HolsterReading
- \instantiates QmlHolsterReading
- \ingroup qml-sensors_reading
- \inqmlmodule QtSensors
- \since QtSensors 5.1
- \inherits SensorReading
- \brief The HolsterReading element holds the most recent HolsterSensor reading.
-
- The HolsterReading element holds the most recent HolsterSensor reading.
-
- This element wraps the QHolsterReading class. Please see the documentation for
- QHolsterReading for details.
-
- This element cannot be directly created.
-*/
-
-QmlHolsterReading::QmlHolsterReading(QHolsterSensor *sensor)
- : m_sensor(sensor)
- , m_holstered(false)
-{
-}
-
-QmlHolsterReading::~QmlHolsterReading()
-{
-}
-
-/*!
- \qmlproperty qreal HolsterReading::holstered
- This property holds whether the device is holstered.
-
- Please see QHolsterReading::holstered for information about this property.
-*/
-
-bool QmlHolsterReading::holstered() const
-{
- return m_holstered;
-}
-
-QBindable<bool> QmlHolsterReading::bindableHolstered() const
-{
- return &m_holstered;
-}
-
-QSensorReading *QmlHolsterReading::reading() const
-{
- return m_sensor->reading();
-}
-
-void QmlHolsterReading::readingUpdate()
-{
- m_holstered = m_sensor->reading()->holstered();
-}
diff --git a/src/sensorsquick/qmlholstersensor_p.h b/src/sensorsquick/qmlholstersensor_p.h
deleted file mode 100644
index 39803764..00000000
--- a/src/sensorsquick/qmlholstersensor_p.h
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 Research In Motion
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtSensors module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or (at your option) the GNU General
-** Public license version 3 or any later version approved by the KDE Free
-** Qt Foundation. The licenses are as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-2.0.html and
-** https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QMLHOLSTERSENSOR_P_H
-#define QMLHOLSTERSENSOR_P_H
-
-//
-// W A R N I N G
-// -------------
-//
-// This file is not part of the Qt API. It exists purely as an
-// implementation detail. This header file may change from version to
-// version without notice, or even be removed.
-//
-// We mean it.
-//
-
-#include "qmlsensor_p.h"
-
-QT_BEGIN_NAMESPACE
-
-class QHolsterSensor;
-
-class Q_SENSORSQUICK_PRIVATE_EXPORT QmlHolsterSensor : public QmlSensor
-{
- Q_OBJECT
- QML_NAMED_ELEMENT(HolsterSensor)
- QML_ADDED_IN_VERSION(5,1)
-public:
- explicit QmlHolsterSensor(QObject *parent = 0);
- ~QmlHolsterSensor();
-
- QSensor *sensor() const override;
-
-private:
- QmlSensorReading *createReading() const override;
-
- QHolsterSensor *m_sensor;
-};
-
-class Q_SENSORSQUICK_PRIVATE_EXPORT QmlHolsterReading : public QmlSensorReading
-{
- Q_OBJECT
- Q_PROPERTY(bool holstered READ holstered
- NOTIFY holsteredChanged BINDABLE bindableHolstered)
- QML_NAMED_ELEMENT(HolsterReading)
- QML_UNCREATABLE("Cannot create HolsterReading")
- QML_ADDED_IN_VERSION(5,1)
-public:
- explicit QmlHolsterReading(QHolsterSensor *sensor);
- ~QmlHolsterReading();
-
- bool holstered() const;
- QBindable<bool> bindableHolstered() const;
-
-Q_SIGNALS:
- void holsteredChanged();
-
-private:
- QSensorReading *reading() const override;
- void readingUpdate() override;
-
- QHolsterSensor *m_sensor;
- Q_OBJECT_BINDABLE_PROPERTY(QmlHolsterReading, bool,
- m_holstered, &QmlHolsterReading::holsteredChanged)
-};
-
-QT_END_NAMESPACE
-#endif
diff --git a/src/sensorsquick/qmlirproximitysensor.cpp b/src/sensorsquick/qmlirproximitysensor.cpp
index 81c41f33..bcc24937 100644
--- a/src/sensorsquick/qmlirproximitysensor.cpp
+++ b/src/sensorsquick/qmlirproximitysensor.cpp
@@ -48,6 +48,7 @@
\since QtSensors 5.0
\inherits Sensor
\brief The IRProximitySensor element reports on infra-red reflectance values.
+ \internal
This element wraps the QIRProximitySensor class. Please see the documentation for
QIRProximitySensor for details.
@@ -83,6 +84,7 @@ QSensor *QmlIRProximitySensor::sensor() const
\since QtSensors 5.0
\inherits SensorReading
\brief The IRProximityReading element holds the most recent IR proximity reading.
+ \internal
The IRProximityReading element holds the most recent IR proximity reading.
diff --git a/src/sensorsquick/qmllidsensor.cpp b/src/sensorsquick/qmllidsensor.cpp
index 3c841f2b..0ec4a17f 100644
--- a/src/sensorsquick/qmllidsensor.cpp
+++ b/src/sensorsquick/qmllidsensor.cpp
@@ -47,6 +47,7 @@
\since QtSensors 5.9
\inherits Sensor
\brief The LidSensor element reports on whether a device is closed.
+ \internal
The LidSensor element reports on whether a device is closed.
@@ -84,6 +85,7 @@ QSensor *QmlLidSensor::sensor() const
\since QtSensors 5.9
\inherits SensorReading
\brief The LidReading element holds the most recent LidSensor reading.
+ \internal
The LidReading element holds the most recent LidSensor reading.
diff --git a/src/sensorsquick/qmltapsensor.cpp b/src/sensorsquick/qmltapsensor.cpp
index ae89cc4b..90a08de0 100644
--- a/src/sensorsquick/qmltapsensor.cpp
+++ b/src/sensorsquick/qmltapsensor.cpp
@@ -49,6 +49,7 @@
\inherits Sensor
\brief The TapSensor element reports tap and double tap events
along the X, Y and Z axes.
+ \internal
The TapSensor element reports tap and double tap events
along the X, Y and Z axes.
@@ -106,6 +107,7 @@ void QmlTapSensor::setReturnDoubleTapEvents(bool ret)
\since QtSensors 5.0
\inherits SensorReading
\brief The TapReading element holds the most recent TapSensor reading.
+ \internal
The TapReading element holds the most recent TapSensor reading.
diff --git a/tests/auto/common/test_backends.cpp b/tests/auto/common/test_backends.cpp
index a8ce7f3f..cbdda60c 100644
--- a/tests/auto/common/test_backends.cpp
+++ b/tests/auto/common/test_backends.cpp
@@ -104,10 +104,6 @@ void set_test_backend_reading(QSensor* sensor, const QVariantMap& values)
QOrientationReading* reading = static_cast<QOrientationReading*>(backend->reading());
reading->setOrientation(QOrientationReading::Orientation(values["orientation"].toInt()));
backend->newReadingAvailable();
- } else if (sensor->type() == "QDistanceSensor") {
- QDistanceReading* reading = static_cast<QDistanceReading*>(backend->reading());
- reading->setDistance(values["distance"].value<qreal>());
- backend->newReadingAvailable();
} else if (sensor->type() == "QAmbientLightSensor") {
QAmbientLightReading* reading = static_cast<QAmbientLightReading*>(backend->reading());
reading->setLightLevel(QAmbientLightReading::LightLevel(values["lightLevel"].toInt()));
@@ -138,10 +134,6 @@ void set_test_backend_reading(QSensor* sensor, const QVariantMap& values)
if (values.contains("relativeHumidity")) reading->setRelativeHumidity(values["relativeHumidity"].value<qreal>());
if (values.contains("absoluteHumidity")) reading->setAbsoluteHumidity(values["absoluteHumidity"].value<qreal>());
backend->newReadingAvailable();
- } else if (sensor->type() == "QHolsterSensor") {
- QHolsterReading* reading = static_cast<QHolsterReading*>(backend->reading());
- reading->setHolstered(values["holstered"].value<bool>());
- backend->newReadingAvailable();
} else if (sensor->type() == "QAmbientTemperatureSensor") {
QAmbientTemperatureReading* reading = static_cast<QAmbientTemperatureReading*>(backend->reading());
reading->setTemperature(values["temperature"].value<qreal>());
@@ -150,10 +142,6 @@ void set_test_backend_reading(QSensor* sensor, const QVariantMap& values)
QLightReading* reading = static_cast<QLightReading*>(backend->reading());
reading->setLux(values["illuminance"].value<qreal>());
backend->newReadingAvailable();
- } else if (sensor->type() == "QAltimeter") {
- QAltimeterReading* reading = static_cast<QAltimeterReading*>(backend->reading());
- reading->setAltitude(values["altitude"].value<qreal>());
- backend->newReadingAvailable();
} else if (sensor->type() == "QIRProximitySensor") {
QIRProximityReading* reading = static_cast<QIRProximityReading*>(backend->reading());
reading->setReflectance(values["reflectance"].value<qreal>());
diff --git a/tests/auto/common/test_backends.h b/tests/auto/common/test_backends.h
index 80d6913c..1e6cd09b 100644
--- a/tests/auto/common/test_backends.h
+++ b/tests/auto/common/test_backends.h
@@ -38,12 +38,10 @@ void set_test_backend_reading(QSensor* sensor, const QVariantMap& values);
void set_test_backend_busy(QSensor* sensor, bool busy);
#include <qaccelerometer.h>
-#include <qaltimeter.h>
#include <qambientlightsensor.h>
#include <qambienttemperaturesensor.h>
#include <qcompass.h>
#include <qgyroscope.h>
-#include <qholstersensor.h>
#include <qlightsensor.h>
#include <qmagnetometer.h>
#include <qorientationsensor.h>
@@ -53,7 +51,6 @@ void set_test_backend_busy(QSensor* sensor, bool busy);
#include <qtapsensor.h>
#include <qirproximitysensor.h>
#include <qtiltsensor.h>
-#include <qdistancesensor.h>
#include <qlidsensor.h>
#include <qhumiditysensor.h>
@@ -94,9 +91,6 @@ PREPARE_SENSORINTERFACE(QAccelerometer, QAccelerometerReading, QAccelerometerFil
reading->setY(1.0);
reading->setZ(1.0);
})
-PREPARE_SENSORINTERFACE(QAltimeter, QAltimeterReading, QAltimeterFilter, {
- reading->setAltitude(8848);
-})
PREPARE_SENSORINTERFACE(QAmbientLightSensor, QAmbientLightReading, QAmbientLightFilter, {
reading->setLightLevel(QAmbientLightReading::Twilight);
})
@@ -112,9 +106,6 @@ PREPARE_SENSORINTERFACE(QGyroscope, QGyroscopeReading, QGyroscopeFilter, {
reading->setY(1.0);
reading->setZ(1.0);
})
-PREPARE_SENSORINTERFACE(QHolsterSensor, QHolsterReading, QHolsterFilter, {
- reading->setHolstered(true);
-})
PREPARE_SENSORINTERFACE(QLightSensor, QLightReading, QLightFilter, {
reading->setLux(1.0);
})
@@ -148,9 +139,6 @@ PREPARE_SENSORINTERFACE(QTiltSensor, QTiltReading, QTiltFilter, {
reading->setYRotation(1.0);
reading->setXRotation(1.0);
})
-PREPARE_SENSORINTERFACE(QDistanceSensor, QDistanceReading, QDistanceFilter, {
- reading->setDistance(1.0);
-})
PREPARE_SENSORINTERFACE(QLidSensor, QLidReading, QLidFilter, {
reading->setBackLidClosed(true);
reading->setFrontLidClosed(true);
diff --git a/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp b/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp
index d266649f..57cd0cb1 100644
--- a/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp
+++ b/tests/auto/qml/qml_cpp/tst_sensors_qmlcpp.cpp
@@ -48,17 +48,14 @@
#include <QtSensorsQuick/private/qmlcompass_p.h>
#include <QtSensorsQuick/private/qmlproximitysensor_p.h>
#include <QtSensorsQuick/private/qmlorientationsensor_p.h>
-#include <QtSensorsQuick/private/qmldistancesensor_p.h>
#include <QtSensorsQuick/private/qmlambientlightsensor_p.h>
#include <QtSensorsQuick/private/qmlmagnetometer_p.h>
#include <QtSensorsQuick/private/qmllidsensor_p.h>
#include <QtSensorsQuick/private/qmltiltsensor_p.h>
#include <QtSensorsQuick/private/qmlrotationsensor_p.h>
#include <QtSensorsQuick/private/qmlhumiditysensor_p.h>
-#include <QtSensorsQuick/private/qmlholstersensor_p.h>
#include <QtSensorsQuick/private/qmlambienttemperaturesensor_p.h>
#include <QtSensorsQuick/private/qmllightsensor_p.h>
-#include <QtSensorsQuick/private/qmlaltimeter_p.h>
#include <QtSensorsQuick/private/qmlirproximitysensor_p.h>
QT_USE_NAMESPACE
@@ -143,9 +140,6 @@ void tst_sensors_qmlcpp::testReadingBindings()
testSensorReadings<QmlOrientationSensor, QmlOrientationSensorReading, QOrientationReading::Orientation>(
"QOrientationSensor",
{{"orientation", QVariantList{QOrientationReading::LeftUp, QOrientationReading::RightUp}}});
- testSensorReadings<QmlDistanceSensor, QmlDistanceReading, qreal>(
- "QDistanceSensor",
- {{"distance", QVariantList{1.0, 2.0}}});
testSensorReadings<QmlMagnetometer, QmlMagnetometerReading, qreal>(
"QMagnetometer",
{{"x", QVariantList{1.0, 2.0}},
@@ -175,18 +169,12 @@ void tst_sensors_qmlcpp::testReadingBindings()
"QHumiditySensor",
{{"relativeHumidity", QVariantList{1.0, 2.0}},
{"absoluteHumidity", QVariantList{1.0, 2.0}}});
- testSensorReadings<QmlHolsterSensor, QmlHolsterReading, bool>(
- "QHolsterSensor",
- {{"holstered", QVariantList{true, false}}});
testSensorReadings<QmlAmbientTemperatureSensor, QmlAmbientTemperatureReading, qreal>(
"QAmbientTemperatureSensor",
{{"temperature", QVariantList{30.0, 40.0}}});
testSensorReadings<QmlLightSensor, QmlLightSensorReading, qreal>(
"QLightSensor",
{{"illuminance", QVariantList{1.0, 2.0}}});
- testSensorReadings<QmlAltimeter, QmlAltimeterReading, qreal>(
- "QAltimeter",
- {{"altitude", QVariantList{8848, 9959}}});
testSensorReadings<QmlIRProximitySensor, QmlIRProximitySensorReading, qreal>(
"QIRProximitySensor",
{{"reflectance", QVariantList{0.5, 0.6}}});
diff --git a/tests/auto/qml/qml_quick/tst_sensors_basic.qml b/tests/auto/qml/qml_quick/tst_sensors_basic.qml
index f6553df4..b5cab08b 100644
--- a/tests/auto/qml/qml_quick/tst_sensors_basic.qml
+++ b/tests/auto/qml/qml_quick/tst_sensors_basic.qml
@@ -215,17 +215,14 @@ TestCase {
{tag: "Compass", initialReading: {azimuth: 1.0, calibrationLevel: 1.0}, newReading: {azimuth: 2.0, calibrationLevel: 3.0}},
{tag: "ProximitySensor", initialReading: {near: true}, newReading: {near: false}},
{tag: "OrientationSensor", initialReading: {orientation: OrientationReading.LeftUp}, newReading: {orientation: OrientationReading.RightUp}},
- {tag: "DistanceSensor", initialReading: {distance: 1.0}, newReading: {distance: 2.0}},
{tag: "AmbientLightSensor", initialReading: {lightLevel: AmbientLightReading.Twilight}, newReading: {lightLevel: AmbientLightReading.Sunny}},
{tag: "Magnetometer", initialReading: {x : 1.0, y: 1.0, z: 1.0, calibrationLevel: 1.0}, newReading: {x : 2.0, y: 3.0, z: 4.0, calibrationLevel: 5.0}},
{tag: "LidSensor", initialReading: {backLidClosed:true, frontLidClosed: true}, newReading: {backLidClosed:false, frontLidClosed: false}},
{tag: "TiltSensor", initialReading: {yRotation: 1.0, xRotation: 1.0}, newReading: {yRotation: 2.0, xRotation: 3.0}},
{tag: "RotationSensor", initialReading: {x: 1.0, y: 1.0, z: 1.0}, newReading: {x: 2.0, y: 3.0, z: 4.0}},
{tag: "HumiditySensor", initialReading: {relativeHumidity: 1.0, absoluteHumidity: 1.0}, newReading: {relativeHumidity: 2.0, absoluteHumidity: 3.0}},
- {tag: "HolsterSensor", initialReading: {holstered: true}, newReading: {holstered: false}},
{tag: "AmbientTemperatureSensor", initialReading: {temperature: 30.0}, newReading: {temperature: 40.0}},
{tag: "LightSensor", initialReading: {illuminance: 1.0}, newReading: {illuminance: 2.0}},
- {tag: "Altimeter", initialReading: {altitude: 8848}, newReading: {altitude: 9959}},
{tag: "IRProximitySensor", initialReading: {reflectance: 0.5}, newReading: {reflectance: 0.6}}
];
}
diff --git a/tests/auto/qsensor/tst_qsensor.cpp b/tests/auto/qsensor/tst_qsensor.cpp
index 69c5c5f1..6c74ba3d 100644
--- a/tests/auto/qsensor/tst_qsensor.cpp
+++ b/tests/auto/qsensor/tst_qsensor.cpp
@@ -816,10 +816,6 @@ private slots:
QCOMPARE(reading->z(), 1.0);
})
- TEST_SENSORINTERFACE(QAltimeter, QAltimeterReading, {
- QCOMPARE(reading->altitude(), 8848.0);
- })
-
TEST_SENSORINTERFACE(QAmbientLightSensor, QAmbientLightReading, {
QCOMPARE(reading->lightLevel(), QAmbientLightReading::Twilight);
})
@@ -839,10 +835,6 @@ private slots:
QCOMPARE(reading->z(), 1.0);
})
- TEST_SENSORINTERFACE(QHolsterSensor, QHolsterReading, {
- QCOMPARE(reading->holstered(), true);
- })
-
TEST_SENSORINTERFACE(QLightSensor, QLightReading, {
QCOMPARE(reading->lux(), 1.0);
})