summaryrefslogtreecommitdiffstats
path: root/src/sensorsquick
Commit message (Collapse)AuthorAgeFilesLines
* Examples: Always use Title CapitalizationKai Köhne2021-08-041-1/+1
| | | | | | | Change-Id: I5930d9381220fbf4337d6cd90b678f0de3354cec Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 768ea94fdf7e6f10767ef843d576ac4729046c67) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* qtsensors: Add QtQml dependencyJuha Vuolle2021-07-011-0/+2
| | | | | | | | | | | The QtSensors module needs QtQml as a dependency or else tooling is not able to properly resolve its types. Change-Id: I16872f59d58b07781d3a9024bb94a2e021f3f84b Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit 2792d190cab778b2f1ed4591156fd2a282ec5d31) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Update QtSensors platform- and sensor support in Qt6Juha Vuolle2021-06-2910-707/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* QtSensors Qt6 documentation base updateJuha Vuolle2021-06-291-3/+4
| | | | | | | | | | | | | | | | | The QtSensors module shall be released in 6.2 for the first time in Qt 6 series. This commit updates the basic things of the documentation accordingly. Documentation for sensor support, platform support, and examples shall be updated with followup commits. [ChangeLog][sensorfw] sensorfw removed from docs for now Task-number: QTBUG-92512 Change-Id: I7c5e447766109bf9da8ab3cc56fe22ec42dbd875 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com> (cherry picked from commit 175a5ab34240c723ad2c2a2d60ad38a01ed6d218) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unused QmlSensorReading constructor parameterJuha Vuolle2021-06-2221-49/+21
| | | | | | | | | | | | The ctor parameter is not used. For clarity it should be mentioned that the memory management of the created 'reading' is done by explicitly parenting the 'reading' in the qmlsensor baseclass. Task-number: QTBUG-92505 Change-Id: I4e50bcafa7789f7400364078302339915473a3b1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 89905b1ea1c81013d21093c95f6fee2665fdaa69) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Remove unused '_update()' function (code cleanup)Juha Vuolle2021-06-224-12/+0
| | | | | | | | Task-number: QTBUG-92505 Change-Id: I808065376616ab87af058b2fc5012fc691514589 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 8ca52678587e2c7e7bc45bf205a734aad72e3008) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Add binding support for sensor readingsJuha Vuolle2021-06-2140-274/+418
| | | | | | | | | | | | | | | | | | | | | | | | | | Many of the sensors' QML "reading" value properties change with high frequency. This makes them candidates to benefit from the more performant bindable support. This commit adds the bindable support for QML sensor 'reading' classes: pressure, gyroscope, tap, compass, proximity, orientation, distance, magnetometer, lid reading, tilt, rotation, humidity, holster, ambient temperature, light sensor, altimeter, IR proximity, accelerometer, ambient light, and sensor reading baseclass (timestamp common to all) In addition to the 'reading' classes, the commit adds bindable support for QmlSensor::reading, as it's change signal is emitted with high frequency, on every sensor reading change. Task-number: QTBUG-92513 Task-number: QTBUG-92503 Task-number: QTBUG-92505 Change-Id: I413ddd8a758142b9b93596e55b3bc8c3c2c98252 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> (cherry picked from commit c255fe62f86598f48bd7e69e449aa95aa016f4fb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Correct RotationSensor::hasZ type documentation to 'bool'Juha Vuolle2021-06-161-1/+1
| | | | | | | | Task-number: QTBUG-92512 Change-Id: I72137fa5e1e81b183c058aa600f7fb3204fe1c6c Reviewed-by: Paul Wicking <paul.wicking@qt.io> (cherry picked from commit 491a3f9980b964c49ecd2301548f6db3cd96f127) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Sensor identifier autotest and fix related findingsJuha Vuolle2021-06-152-28/+15
| | | | | | | | | | | | | | | | | This commit adds a (QML) test for sensor identifier (and activation whose logic is closely related). The related changes: * Change sensor 'identifier' and 'type' properties to QByteArray. This now matches with C++ side that uses QByteArray * Allow changing of 'identifier' after componentComplete. This is now aligned with C++ side. Changing identifier is fine as long as the backend is not connected. Task-number: QTBUG-92513 Task-number: QTBUG-92505 Change-Id: I326d840d5a4efb13a3a6578711563e8054cc9961 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit c3cc1253ba159e6f4c9bd4c92da2b8c300ee94f2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Make sensor possible to indicate it is no longer busyJuha Vuolle2021-06-152-1/+3
| | | | | | | | | | | | | | | | The current implementation allowed sensor backend to only indicate that it is busy, but not to tell when it was freed again. This commit allows sensor backend to indicate also that it's busy state has cleared. It is up to the sensor implementation to decide if it makes sense / is possible to do that or not. Task-number: QTBUG-92513 Task-number: QTBUG-92505 Change-Id: Ied4857850e81346031fd83aa347d9955081118e8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit f8445fdcbf75e455443304bc290c48c37961e9f1) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Increase QtSensors QML autotest coverageJuha Vuolle2021-06-154-28/+19
| | | | | | | | | | | | | | | | | This commit introduces QML based auto tests in order to increase the autotest coverage. Additionally the QML sensor activity handling is fixed which caused the newly added tests to fail. There are also long-standing bugs about these activeChanged() double emits. Task-number: QTBUG-92514 Task-number: QTBUG-70770 Task-number: QTBUG-80755 Change-Id: I98f036f665a056c441efa00aab76ec47bc628057 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 54b3ca67ad7230a21d76c581dd4287401acb230f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
* Replace Q_FOREACH with ranged for loopsJuha Vuolle2021-06-081-2/+2
| | | | | | Task-number: QTBUG-92505 Change-Id: I1e8334473c883f76285736f6a26138ea882f5351 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Port QtSensors to new QML CMake APIFabian Kosmale2021-06-051-11/+3
| | | | | | Change-Id: I73ad44222b2ecefca4457b5dd1713207dc515223 Reviewed-by: Andrei Golubev <andrei.golubev@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Replace Q_NULLPTR with nullptrKevin Funk2021-06-021-1/+1
| | | | | Change-Id: I9885deb29ebcd5db51a00cbcc2f063bfc418e23f Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Few cleanups and modernizationsJuha Vuolle2021-06-022-2/+2
| | | | | | | | | | | This commit introduces few source compatible changes: - Change obsoleted Q_ENUMS => Q_ENUM - Mark QSensor::type property as CONSTANT as it cannot change - Add change signal to QSensor::identifier and a testcase for it Task-number: QTBUG-92505 Change-Id: I6e3a652929d15bc5211448be2ae9254ed6d21118 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Split the Sensors QML plugin into a library and a pluginJuha Vuolle2021-05-2648-0/+6608
The main changes: - Introduction of new SensorsQuick library with private exports - The original QML plugin loads this new library and does little else - Renamed original 'sensors' plugin as 'declarative_sensors' to provide an idea what it relates to - Renamed library headers as private "_p.h" and added "We mean it" - Changed qmlRegister* calls to QML_ELEMENT macros - Removed files that are generated in Qt6 (qmldir, plugins.qmltypes) Task-number: QTBUG-92530 Change-Id: I18f849adabcc79ac47e67305f78aefeee82801bc Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>