summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Rename subclass static variable which shadowed baseclass methodJuha Vuolle2021-05-1951-132/+138
| | | | | | | | | | | The 'type' static variable shadowed the 'QSensors::type()' method of the baseclass. While this is easy to workaround it is better to remove such naming clash. Task-number: QTBUG-60246 Change-Id: Id0ddae978377ea4d4d0202a572c554c2541f9364 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Android rotation sensor value and datarate fixJuha Vuolle2021-05-172-7/+37
| | | | | | | | | | | | | | There was a breaking change in Android rotation sensor handling in Qt 5.12.4 when migrating to NDK usage: -The unit conversion logic was not transferred as part of the migration. This task reintroduces the unit conversion part. -The datarate interval was misinterpreted as usec, whereas it is Hz Fixes: QTBUG-77423 Change-Id: Ibe51b3dea393e1cbe1502b5611c07f32024daf57 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit edf82b1d6dc7572da93bbdcd5b4ce46fa1dab2ad) Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Android: use new public jni apisAssam Boudjelthia2021-05-102-21/+28
| | | | | | | | | Replace use of QJNIObjectPrivate with QJniObject. Get context() and sdkVersion() from QNativeInterface::QAndroidApplication. Fixes: QTBUG-92550 Change-Id: I625b2269ef253e1a1f76f82edebac236de184c2c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtSensors: Fix iOS sensor backend loadingTamás Martinec2021-04-301-2/+6
| | | | | | | | | | Setting the default backend to the last registered backend if the current default is a dummy backend. Task-number: QTBUG-92508 Change-Id: Id67625544f0da2dae118998429c0aeeee2a94cb2 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi>
* Disable PCH on iOS pluginJuha Vuolle2021-04-201-0/+5
| | | | | | | | | | | If a target inherits precompile headers from a different target that has more languages enabled (CXX, OBJCXX), the target will depend on PCH artifacts for a language that is not actually present. Task-number: QTBUG-92502 Change-Id: Ib8d27a63d3f6e0afeb55f4ce3988edd6c0b8ce81 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Compile-config test for winrtJuha Vuolle2021-04-203-3/+21
| | | | | | | | | | | | | While winrt as a "windows phone" is not supported anymore, the APIs are available on windows and can be supported where applicable (bluetooth, positioning, sensors, ...). This commit adds a configuration tests for the presence of these headers and libraries. Task-number: QTBUG-92502 Change-Id: Ia6dcb0a6b8ecdbcf1d1bcf79e42f95ace75f6657 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QtSensors initial cmake supportLorn Potter2021-04-1971-2554/+643
| | | | | | | | | | | | | | | | | This commit introduces the bare minimum cmake support that should unblock the CI and allow further verification and development on most platforms: macOS, Linux, Win, iOS and Android. Some clarifications: * The support for sensorfw backend is very preliminary and can be enabled later if needed (no Qt6 version of the sensorfw). * The simulator backend is dropped as obsolete / unnecessary. * Three examples are currently commented out and shall be ported with a later commit. Task-number: QTBUG-92502 Change-Id: Id523d43ed3ef177010dc73afc5812ed374cff0dd Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Base commit to make QtSensors runnable on WindowsJuha Vuolle2021-04-1915-157/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | Fair amount of work remains after the commit still, but this should allow further development as a compilable baseline: code compiles, autotests pass, and most example applications at least start. The changes: -Change examples to use QtQuickControls 2 as per removal of v1 -Fix ambiguous conditional expression compilation error -Link against runtimeobject library (previously part of winrt QPA?) -Change the .pro file rule to win32 as winrt moniker does not exist anymore -Remove references to deleted winrt event dispatcher -Fix error handling: getdefault may be successful even if there is no default sensor -Fix QCOMPARE failure output (toString has changed in Qt6) -Remove qtimestamp alias which was deprecated already in Qt5 -Remove unit test hook that does not seem to be used anywhere -From typedef to ‘using’ for readability -Q_ENUMS -> Q_ENUM as the former has been obsoleted by the latter -Add qt6 changes qdoc page Task-number: QTBUG-88616 Change-Id: I92c168228ba76106b2c636c88f54331c76c3d2e6 Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove two QChar related deprecation warningsJuha Vuolle2020-12-181-2/+2
| | | | | Change-Id: Ia2ecc159b8c53035673a7250230ed0a56bfa06a2 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Qt6 uses qsizetype for the qqmllistproperty size/indexesJuha Vuolle2020-12-181-2/+2
| | | | | Change-Id: Ifea53d932e1c5726c57dc31f0c7a40892db3501c Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* QAtomicInt load() and store() are removed in Qt6, change to *Relaxed()Juha Vuolle2020-12-171-2/+2
| | | | | | Change-Id: I719afb5243a6e4e8d54a7f82a74a0c6bf0207c98 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-06-302-3/+3
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I36a9c2a142b8485755b8849b839eac972e288bf6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use QList instead of QVectorJarek Kobus2020-06-259-21/+19
| | | | | | | Task-number: QTBUG-84469 Change-Id: I4ef3c22412f5978b3474c0ccd90bae08fd7f1297 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-03-101-3/+3
|\ | | | | | | Change-Id: I04bcb739fdaaaf4a4aa052b19cbd0b690b0c8947
| * Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta4v5.15.0-beta3v5.15.0-beta2Qt Forward Merge Bot2020-03-071-3/+3
| |\ | | | | | | | | | Change-Id: Iab2eee7fbd86759c6f9512b79c65ca5dc773b748
| | * Doc: Make sure to advocate latest sensors importKai Koehne2020-03-061-3/+3
| | | | | | | | | | | | | | | Change-Id: I37f010fa8f9ab3f4b3c1f355110228ae1ce58dc3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-291-1/+1
|\| | | | | | | | | | | Change-Id: If4b8ecc6e59564b5cf82b91c56baef2c8b96511b
| * | Update plugins.qmltypes for 5.15Jani Heikkinen2020-02-251-1/+1
| |/ | | | | | | | | | | Task-number: QTBUG-82253 Change-Id: I38c24b441c3778ee316651ee5f5eaf6f3abf815d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-12-103-26/+60
|\| | | | | | | Change-Id: Iba47a90c345bd18c156ae4bddfa6e9931ff98804
| * Fix QML API for sensor rangesUlf Hermann2019-12-033-26/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the QQmlListProperties were constructed on stack-allocated lists, which immediately turned into dangling pointers on return. Also, none of the sensor ranges was ever deleted. Keep the sensor ranges in persistent lists in the private object, parent them to the main QmlSensor object, and add some tests for them. Fixes: QTBUG-79224 Change-Id: Ie61d0aaeaaaf998c1d1f46f60c81848ae48659d6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-11-021-1/+1
|\| | | | | | | Change-Id: I729fc3aca8aab817b3e98ddaffd979235308d16b
| * Update plugins.qmltypes for 5.14Kai Koehne2019-10-221-1/+1
| | | | | | | | | | | | Task-number: QTBUG-78690 Change-Id: If399aff73104144bfb4b5de74e64ed7b54f8f63d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-121-1/+1
|\| | | | | | | Change-Id: Id6b9634106adce3e191a203d1f36ca95fc2c4a03
| * Fix library namev5.14.0-beta2v5.14.0-beta1BogDan Vatra2019-10-011-1/+1
| | | | | | | | | | | | Fixes: QTBUG-78616 Change-Id: I63ae0ef7d83cf2336ede280530de54688bf4fa76 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/wip/qt6' into devSimon Hausmann2019-10-041-2/+3
|\ \ | |/ |/| | | | | | | | | Conflicts: .qmake.conf Change-Id: I6cf814d560665490574bd35d5ebfce911a46270f
| * Fix Qt6 buildwip/cmakeAlexandru Croitor2019-08-061-2/+3
| | | | | | | | | | | | | | | | | | | | | | Modify all the qmlRegisterModule calls to use minor version 15 because minor version zero from 6.0.0 would make tests fail. This is similar to what was done in qtdeclarative in c147b20a2c1299b2d659fe7c9472ae3866b6a425. Change-Id: Ie46e7d5b6d4cd5e0e8c6eea5b3ebbbdd83343656 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-244-13/+14
|\ \ | | | | | | | | | Change-Id: I8ee039e82242d46979f8fe7f42164247cf494633
| * | Doc: Replace WinRT with UWP in Qt Sensors module docsLeena Miettinen2019-09-201-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The name of the platform offering in the docs was changed to "Qt for UWP", because WinRT is no longer supported. Task-number: QTBUG-61884 Change-Id: I9b824e630e040d1b9789981596c238615033fd69 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Doc: Remove non-existing arguments from docsLeena Miettinen2019-09-193-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ...for QSensorGesture::detected() and QSensorGestureRecognizer::detected() Also, the Q_QDOC defines are not needed any more. Change-Id: I3fe2fb779caceeb41187815d272aca053af695b3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-228-12/+64
|\| | | |/ |/| | | | | | | | | Conflicts: .qmake.conf Change-Id: Ia190d8f7448766e964472599dc1adf5c6f0eabd7
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-162-2/+2
| |\ | | | | | | | | | Change-Id: I882051b1e585c1af4a27930aa8c575ef641583b5
| | * Doc: Prefer public over private API in linksPaul Wicking2019-07-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change uses the public API and removes references to private API. Task-number: QTBUG-76978 Change-Id: Ifd53dc520a38ff87b12271b7b446fd42753bb7f3 Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
| * | Merge "Merge remote-tracking branch 'origin/5.12' into 5.13"Qt Forward Merge Bot2019-07-113-3/+49
| |\ \
| | * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-113-3/+49
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ic691e11af371acfb7706ee218665fb5a9f96a9c3
| | | * qmltypes: export humidity/distance interfaceGaurav Kalra2019-07-052-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-76133 Change-Id: Iae28989a509384c3fad0fe5b4222e5cc1068881c Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | | * Android: Don't crash for unsupported accelerometer modeKai Pastor2019-07-031-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to documentation, changing the mode shall have no effect when the device does not support a particular mode. Task-number: QTBUG-76862 Change-Id: I805daa3a3f659e8aed25e4b7b6531f804dd654b2 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-07-091-0/+1
| |/ / | | | | | | | | | | | | | | | Task-number: QTBUG-74391 Change-Id: Iacab2b6735bef1d52c640cb7b3e51ae3aa010a56 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-271-1/+1
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Ib6ec0928ab14e075b35648ce0da4efc293be9c94
| | * fix typo that breaks android buildLorn Potter2019-06-171-1/+1
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-76384 Change-Id: Ib1977ea1371e3a82ca14d1c7c450984fa40cd71d Reviewed-by: Vyacheslav Koscheev <vok1980@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-05-111-6/+11
| |\| | | | | | | | | | Change-Id: I71deece5315cb9b29bd9bc72c3198c80c9d14442
| | * Do not register iio sensors if the dbus service is not foundLorn Potter2019-05-081-6/+11
| | | | | | | | | | | | | | | | | | Fixes: QTBUG-74905 Change-Id: I78ca045d2723fa47dc2d0f9cc559320be84e5f32 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Remove usages of deprecated APIs from QDateTimeSona Kurazyan2019-06-277-14/+14
|/ / | | | | | | | | | | | | | | | | | | | | | | - Replaced QTime by QElapsedTimer, because of the usage of QTime::start() and QTime::elapsed() methods, which are deprecated. - Replaced the deprecated QDateTime::toTime_t() with QDateTime::toSecsSinceEpoch(). Task-number: QTBUG-76491 Change-Id: I625ce6bbc2718cd3c1b4905fecef9d75fdbab618 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Doc: Fix qdoc errorsNico Vertriest2019-04-303-3/+5
| | | | | | | | | | Change-Id: I989cc21bdbbd56c3b14b934b3256bda3a01a6764 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-261-2/+0
|\| | | | | | | Change-Id: I580be02701e5e4b5a57f59206d6a50cc98ddf220
| * Remove .jar dependenciesBogDan Vatra2019-04-261-2/+0
| | | | | | | | | | | | Fixes: QTBUG-75381 Change-Id: Iacd5760e176908645e1a49115e122f2e5e3469ca Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3Qt Forward Merge Bot2019-04-1333-1225/+906
|\| | | | | | | Change-Id: Iff501d1162491fafeb9aaf0a68927ade79b3b6e7
| * Say hello to Qt Android Sensors based on NDK APIBogDan Vatra2019-04-1133-1225/+906
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Until Qt 5.9, we had to use JNI way because the NDK sensors API was introduced in API-16. Starting with Qt 5.9 we can safely use the NDK API as API_16 is the minimum API supported by Qt. Using the NDK API instead of JNI boost the performance a lot! The CPU usage dropped 2 to 4 times, from over 60% using the JNI to less than 20%. [ChangeLog][Android] Rewrite Qt Android Sensors using NDK API. Change-Id: If3e3f1e56973e2a189662912b2a6ebfbd71dee14 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* | Update plugins.qmltypes for Qt 5.13Kai Koehne2019-04-121-2/+2
| | | | | | | | | | | | Task-number: QTBUG-73739 Change-Id: Id3be3f2d116d7c1ef8541ced2b75043129b08ab5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta2Qt Forward Merge Bot2019-03-272-7/+7
|\| | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5f26c3f31900ece899f9ce9870057eb5638c4b59
| * Doc: Fix name of global QML singletonUlf Hermann2019-03-202-7/+7
| | | | | | | | | | | | | | | | The module API is called "QmlSensors", not "SensorGlobal". Fixes: QTBUG-74571 Change-Id: Ia998082be99517393389ba3a9785150e97d9c15f Reviewed-by: Andy Shaw <andy.shaw@qt.io>