1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** 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 Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/
/*!
\page qtsensors-changes-qt6.html
\title Changes to Qt Sensors
\ingroup changes-qt-5-to-6
\brief Migrate Qt Sensors to Qt 6.
Qt 6 is a result of the conscious effort to make the framework more
efficient and easy to use.
We try to maintain binary and source compatibility for all the public
APIs in each release. But some changes were inevitable in an effort to
make Qt a better framework.
In this topic we summarize those changes in Qt Sensors, and provide
guidance to handle them.
\section1 Sensor Gesture support
The Gesture support has been removed. In its current shape the gestures
needs rethinking to be of more use for the developers. To track this please
see \l {https://bugreports.qt.io/browse/QTBUG-95649}{QTBUG-95649}.
\section1 Platform notes
\section2 Windows
On Windows, sensors are supported in Qt installations that were built with MSVC.
\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 TI Sensor Tag
Support for TI Sensor Tag has been removed.
\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
The typedef for the historical, QtMobility-era, \c qtimestamp has been
removed. Use the actual type \c quint64 directly.
\section2 Renamed \c sensor type string to \c sensorType
The subclasses of QSensor implement a \c {char const*} string which defines
the string that identifies the base sensor. This static \c type field
shadowed the baseclass \l QSensor::type() method, leading to unnecessary
compilation errors and consequent workarounds. The \c type string has been
now renamed as \c sensorType.
\section2 Renamed LidReading::backLidChanged property to \c backLidClosed
The property name is now aligned with the \c frontLidClosed property of
the same QML type.
\section2 Added parameter to QSensorBackend::sensorBusy() to be able to also clear
the busy state
The \c QSensor::busy property and its accessor, \c QSensor::isBusy(), can be used
to check if the sensor is busy or not. To allow this property to better reflect the
sensor backend's state, QSensorBackend::sensorBusy() now accepts a boolean parameter.
This \c busy parameter is used to set/unset the backend busy state and notify the
QSensor interface attached to it.
The default value for the QSensorBackend::sensorBusy() parameter is \e true which
results in the original behavior (except the added signal emission). This means
that in most if not all cases the changes are not mandatory. Instead it is up to the
individual sensor backend implementations to decide if the changes are useful.
\section2 Sensor::type and and QSensor::type properties marked as constant
The \c type property cannot change after instantiation and is marked as constant
in both C++ and QML.
*/
|