summaryrefslogtreecommitdiff
path: root/src/plugins/position
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta3Qt Forward Merge Bot2020-03-311-5/+6
|\ | | | | | | Change-Id: I8b84b78bf234556b7162066b8401630da2afb311
| * winrt: Fix crash on exitOliver Wolff2020-03-271-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | Using a static ComPtr<IGeoLocationStatics> in requestAccess might cause a crash on exit as this pointer might be cleaned up after the application has exited. Make sure, that this pointer is deleted together with the rest by making it part of the d pointer. Fixes: QTBUG-80711 Change-Id: I93c09a4549967195101de07b3cef430f8cd52229 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | serialnmea plugin construction connect() error fixJyrki Yli-Nokari2020-03-232-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | serialnmea QIOPipePrivate initialization accessed QIOPipe via q_ptr before the object was constructed. [ChangeLog][QtPositioning][serialnmea plugin] Fixed serialnmea plugin initialization when used with serial port. Fixes: QTBUG-82819 Change-Id: I3ff2de381a124f6b25f19327a39f1b001ef4899a Reviewed-by: Paolo Angelelli <paolo.angelelli.qt@gmail.com>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-012-28/+34
|\ \ | |/ | | | | Change-Id: Iae2b08cdf4f64d69bedeabf4633fd34b44a02ad0
| * Android: request permissions before location requests or updatesAssam Boudjelthia2020-01-292-28/+34
| | | | | | | | | | | | | | | | | | startSatelliteUpdates() and lastKnownPosition() were not checking Android permissions before trying to access positioning data. Task-number: QTBUG-81689 Change-Id: Ia4d75920b7b07c6782d80a483a3e3961ed9149f5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-251-2/+2
|\ \ | |/ | | | | Change-Id: I81acc98f1602d20d810e5d792fc670bdaa8b1821
| * Android: JNI_OnLoad return JNI_VERSION_1_6 instead of JNI_VERSION_1_4Assam Boudjelthia2020-01-201-2/+2
| | | | | | | | | | | | | | | | Update instance of old code using JNI_VERSION_1_4 to make the code consistent. Change-Id: Icdb8d152c69f32f1050b51bdb7985acc3364fbf4 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-301-10/+15
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Iccbd3c3f2162973d407a31b02ea6911f3c1d5b31
| * Re-request authorization after the authorization has changedAndy Shaw2019-11-151-10/+15
| | | | | | | | | | | | | | | | | | | | On iOS if an application is put into the background after it was authorized to allow location updates "Only Once" then when it is brought back it is no longer getting updates. Therefore we need to rerequest the authorization so that it can continue to get updates. Change-Id: I72804a7c7e82524e40aab049175e2d8f7dfee469 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-251-1/+1
|/ | | | | | | It is being deprecated. Change-Id: I33a411f9b2fc18feabd3cc8d7f3a44b353e25639 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Add Satellite support to serialnmea pluginPaolo Angelelli2019-08-154-5/+720
| | | | | | | | | | | This adds a new class, QNmeaSatelliteInfoSource, locally to the plugin, that behaves similarly to QNmeaPositionInfoSource in the way of handling the IODevice and producing the updates. Change-Id: Id594152dd70514974ac79c7757ce6f0da4631191 Fixes: QTBUG-59274 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Introduce QIOPipe and use it in serialnmea pluginPaolo Angelelli2019-08-094-23/+397
| | | | | | | | | | | This allows the plugin to pipe the input stream into multiple, independent processing pipelines. Good for allowing multiple position sources from the same serial port, and will allow supporting satellite info source in the nmea plugin too. Change-Id: I21e3cd2c78e7138ca49821c68b55ce96eb83e986 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port from QMutex::Recursive to QRecursiveMutexMarc Mutz2019-08-031-12/+14
| | | | | | | | | Also port from QMutexLocker to std::lock_guard, as the former will not support QRecursiveMutex going forward, and port the remaining ctor-init-list to NSDMI to avoid additional churn going forward. Change-Id: I0645f4b2ffad455c41c12b94af56de800c6d1773 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Support specifying serial port via PluginParameter in serialnmea pluginPaolo Angelelli2019-07-182-8/+33
| | | | | | | | This patch supports the serialnmea.serial_port plugin parameter. Task-number: QTBUG-66304 Change-Id: I1d1e3083f50c25e2ba2fd24ddb300e73b1f883f9 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-291-1/+4
|\ | | | | | | Change-Id: Ia8e0d53bff9f4df0897bb77e75f427acb65f5da7
| * Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-06-251-1/+4
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Id91b04d63ddfe46a44f377add670f704b536c183
| | * winrt: Do not assert if requesting access failedOliver Wolff2019-06-241-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | On Windows 8.1 accessing geolocation statics fails. If this happens, the function should not assert/crash, but just return false. Fixes: QTBUG-76344 Change-Id: I2dbd4734512f731ef065ec1e1e210fc22e057547 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Remove usages of deprecated APIs from QDateTimeSona Kurazyan2019-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced the deprecated QDateTime::fromTime_t() with QDateTime::fromSecsSinceEpoch(). Task-number: QTBUG-76491 Change-Id: I45c5d1816da553e9eaf5cb085ea32087931e10bf Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | QGeoPositionInfoSourceCL: Initialize location timestamp with UTC time specAndrew Dolby2019-06-141-3/+1
|/ / | | | | | | | | | | Fixes: QTBUG-73651 Change-Id: Ie1955e8f524ef828a7407995fc14586ff54f660c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-161-2/+2
|\ \ | |/ | | | | Change-Id: Ibf40dee29026002ce435e4b316ed999e320e73b6
| * Re-enable geoclue plugins on BSD styleAlex Blasche2019-02-121-2/+2
| | | | | | | | | | | | | | | | | | BSD was disabled by 5241d8c727d8e45d0266d486958e6e566563e1c8. Fixes: QTBUG-73714 Change-Id: I31ceb62caa19b231cbf6304138f68c8efdcc65db Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-02-021-3/+1
|\ \ | |/ | | | | Change-Id: Ia0a66c229f249532e70b1548f5e618e4db4bc5ad
| * winrt: Remove incorrect asserts and fix incorrect conditionOliver Wolff2019-01-311-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | setPreferredPositioningMethods and setUpdateInterval are called by init so these functions should not assert in initializing state. Additionally the early exit condition in setPreferredPositioningMethods has to be the same as in setUpdateInterval. Both cases have to return early if the locator has not been initialized. This initialization happens in init, so both states, Initializing and Initialized, are fine for further handling. Change-Id: I4ef8db7178c38299328041a8d163a1b9bbecc5b1 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* | Unify semicolon usage in Q_UNUSEDJesus Fernandez2019-01-236-14/+14
| | | | | | | | | | Change-Id: I36dd6881b6f6f028869d63b6311cba7f52a99cc4 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-223-118/+153
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I8d0881209c8b0a0dce4ed949ef89ee2679448420
| * winrt: Initialize position source on first usageOliver Wolff2019-01-142-24/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | Loading the plugin without access to the location service will work and not error out. It is still possible to enable location service later and the backend will work as expected. This patch changes the behavior so that the pop up asking for access to the user's location data is no longer shown when the plugin is loaded, but when the backend is actually used for the first time. Change-Id: I23100f7867610c6f23b2d2ea5c15c268468949a9 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * winrt: Depend on access to service for supportedPositioningMethodsOliver Wolff2019-01-141-12/+2
| | | | | | | | | | | | | | | | | | | | The locator's status is only updated while a positioning session is active so it does not always reflect the correct state. By checking the access we have a more reliable way to reflect the current state. Task-number: QTBUG-66427 Change-Id: I75d2274c9efd29bf070913246738bf18a9ec5edc Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * winrt: Implement supportedPositioningMethodsChangedOliver Wolff2019-01-141-0/+10
| | | | | | | | | | | | Task-number: QTBUG-66427 Change-Id: I6cccb1d62c116e762e073e996e5932c7351787d9 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * winrt: Initialize status and position tokens' values in constructorOliver Wolff2019-01-141-3/+2
| | | | | | | | | | | | | | | | | | Doing their initialization near the end of init() is too late because parts of init (namely setUpdateInterval and setPreferredPositioningMethods) rely on them. Change-Id: I81ea1db53aa531248f2c49b8f53f2c33b5fb954e Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * winrt: Do not emit error signal with NoErrorOliver Wolff2019-01-141-1/+4
| | | | | | | | | | Change-Id: Ic90cf82b9c07377875408d0c485aa8af987323c4 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * winrt: Smaller code cleanupsOliver Wolff2019-01-142-15/+14
| | | | | | | | | | | | | | | | | | - Use override where applicable - Use declaration initialization if possible - Do not use temporary variables which are not used Change-Id: I68311dfc090fa6a217814a7f801fef6764778cab Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: Check access to location service on every callOliver Wolff2019-01-141-10/+16
| | | | | | | | | | | | | | | | | | | | The access to location services can change while the application is running so checking the access only once does not work. If access is not granted set the proper error code. Change-Id: I00d82dd166d049363de1dc9b0ca7015bc494baf5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: Minor changes to loggingOliver Wolff2019-01-141-2/+3
| | | | | | | | | | Change-Id: Iaad7abbb668d6d0542c3697dae3544f7d8fe5c5a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: React on position source status change eventsOliver Wolff2019-01-142-55/+52
| | | | | | | | | | | | | | | | | | | | | | Querying the position source's status is error prone as it is only updated if position tracking is active. Instead we can react on changes for this status and get updated information when it is available. Change-Id: I18d55faf6163568243d2e05d3c63f13e9e45f413 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-105-6/+27
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I0724ca9ffbb8099f698b090a4fdd993fad2c2302
| * winrt: Minor improvements in error handlingOliver Wolff2019-01-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | - If more than 1 action is done inside runOnXamlThread any error should cause a "top level" error. - If every possible error inside runOnXamlThread gives a proper error message we do not need another error message outside of the block. Change-Id: I910f9e4bc7984e1c7e1f358eee975738ffa3bb2f Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Ensure QGeoPositionInfoSource::supportedPositioningMethodsChanged() on AndroidAlex Blasche2019-01-044-3/+23
| | | | | | | | | | | | | | | | | | | | | | This signal was added in Qt 5.12 but never emitted on Android. Due to implementation issues this signal is emitted for each provider change (e.g. twice if network and gps provider were disabled when the entire location service is disabled) Task-number: QTBUG-66427 Change-Id: I820b3187bfd8b8ab4facb053e2019e4f5c9736d0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Fix QGeoPositionInfoSource::supportedPositioningMethods() on AndroidAlex Blasche2019-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | So far this method returned all existing positioning methods and not the available methods. Availability is defined by customer settings like turning location off or only enabling GPS based positioning. Task-number: QTBUG-66427 Change-Id: Id5b58ee4cc0274bae90ed2e363cb5cf2a287dc05 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-251-28/+43
|\ \ | |/ | | | | Change-Id: Ic8ccf43538ad411edce061f24f05c627dab50a6b
| * Collect vertical position accurancy detailsAlex Blasche2018-12-141-1/+15
| | | | | | | | | | | | | | | | | | Android's platform API supports this piece of information since API version 26. Fixes: QTBUG-64689 Change-Id: I09cce4979f3f754cb9af11281de2fe0050b74da1 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * Fix warnings in jnipositioning.cppAlex Blasche2018-12-101-27/+28
| | | | | | | | | | | | | | | | | | Since Android uses a new NDK/compiler since 5.12 there were many more warnings which had serious implications. Examples are potentially flawed downcasts, nullptr warnings and old style casting operators. Change-Id: I53989fa9120c8b7e865d23255d1fcdf229e7f2f3 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-106-87/+161
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I00453b819d65460dabf771617e6181275461cc78
| * Fix horizontal accuracy comparison for competing position resultsAlex Blasche2018-12-051-1/+1
| | | | | | | | | | | | Fixes: QTBUG-72291 Change-Id: Id2c2ce04e12f1470b08e93ec3512ab39b4054f7d Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
| * Fix warning in Android position pluginAlex Blasche2018-12-051-1/+1
| | | | | | | | | | | | | | | | qtlocation/src/plugins/position/android/src/qgeopositioninfosource_android.cpp:226: warning: implicit conversion loses integer precision: 'qint64' (aka 'long long') to 'const int' Change-Id: I64df529028aac88f1b6e05c72cfba0a9ed6c9a7f Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
| * Fix compilation with gcc 4.8Ville Voutilainen2018-12-031-1/+1
| | | | | | | | | | | | | | GCC 4.8 doesn't like using QPointer in signal connections. Change-Id: I9504efb259712a65427ef1366ca562882085404e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * winrt: Implement minimumUpdateIntervalOliver Wolff2018-11-281-12/+12
| | | | | | | | | | | | | | | | | | According to MSDN GeoLocator's default ReportInterval is 1 second or as frequent as the hardware can support – whichever is shorter. By using that functionality we can support minimumUpdateInterval "properly". Change-Id: Id54197babeec04c8fc0a309930b192e36d9138f8 Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * winrt: Restart location handler on setUpdateInterval if necessaryOliver Wolff2018-11-281-0/+8
| | | | | | | | | | | | | | | | | | | | | | Windows' backend will complain if we try to set the report interval while being subscribed to position changes so we have to remove this registration and redo it when the new interval is in effect. Change-Id: I5b3f23a7b6e530dd0a3f673e2b8ce6f5102b7eb1 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: Remove unneeded status change callbackOliver Wolff2018-11-282-18/+0
| | | | | | | | | | | | | | | | | | | | | | We do not use the native callback's result but Windows' backend will complain if we try to set some of GeoLocator's properties while we are registered for status changes. By removing the callback registration we get rid of these warnings. Change-Id: Ic3829ee438c708fb4411ba94ba1202bb427e8815 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io>
| * winrt: Check availability in requestAccess on desktop buildsOliver Wolff2018-11-281-5/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | For some reason the native status is always Disabled for desktop builds (even though the location service is running). So with desktop builds we have to use requestAccess to gain information about the state of the location service. As the functionality is async the important parts of QWinRTFunctions are shadowed locally. Change-Id: I575ee0b161de734c29453a7a07350bc8d09720e8 Reviewed-by: Andre de la Rocha <andre.rocha@qt.io> Reviewed-by: Miguel Costa <miguel.costa@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: Small code cleanupOliver Wolff2018-11-281-4/+1
| | | | | | | | | | | | | | Windows 8.1 is no longer supported Change-Id: I00d103057a63abbcbc3ad3baa8ef93b35e07e819 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>