summaryrefslogtreecommitdiff
path: root/src/plugins/position
Commit message (Collapse)AuthorAgeFilesLines
...
| * winrt: Make sure that Co(Un)Initialize is calledOliver Wolff2018-11-281-0/+2
| | | | | | | | | | | | | | | | | | | | If the QGeoPositionInfoSource is created in a command line app we cannot rely on CoInitialize having been called by the event dispatcher before. Fixes: QTBUG-71194 Change-Id: Id2a8fd22f7b4cf6e5c2629bf7dcd8319b585666e Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * winrt: Replace deprecated functionsOliver Wolff2018-11-281-20/+31
| | | | | | | | | | | | | | | | | | get_Altitude and the like are marked deprecated and thus should not be used. Use proper replacement functions as advised in Microsoft's documentation. Change-Id: I2166611a3133cadf9fb110242f231d76ca517932 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * winrt: Fix setting of verticalAccuracyOliver Wolff2018-11-281-1/+1
| | | | | | | | | | Change-Id: I74ce6e9433eb7ad0f065ea5c554a8c11dd690604 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * winrt: Minor code cleanupOliver Wolff2018-11-284-11/+12
| | | | | | | | | | | | | | | | - Use nullptr instead of 0 - Use recommended way of including Qt headers Change-Id: I170dbb5aa41a2dd4d10ff99c421da8a037cbe153 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-271-2/+2
|\ \ | |/ | | | | Change-Id: I79898ba40dcce8054a105867ab2a88f1fba72c1f
| * Do not build geoclue plugins on platforms != linuxOliver Wolff2018-11-221-2/+2
| | | | | | | | | | | | | | | | | | While dbus might be available on other platforms, the plugin might not be functional and thus should not be built on these. Change-Id: I7671a3ecaba6944f99317eee4f7738a7df98ba10 Reviewed-by: Andy Shaw <andy.shaw@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-10-231-8/+19
|\ \ | |/ | | | | Change-Id: If8bb4158f9a46ad703c73fff5bf0b1a0636c4b5e
| * CoreLocation: fix unconditional (previously) method callsTimur Pocheptsov2018-10-221-8/+19
| | | | | | | | | | | | | | | | | | that result in a warning nowadays, saying we must have a description in Info.plist to be able to call these methods. Task-number: QTBUG-41827 Change-Id: Ib1997a609553345358aded419a403582ccfdc0fb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix namespaced buildLiang Qi2018-10-051-2/+2
|/ | | | | | | | | It is not allowed to include files within Qt namespace. See 5b99f3a3 in qtbase dev. Change-Id: Ic86986ebe5d6beafa32c7634ffb1d4631c411bf9 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* Check authorization in QGeoPositionInfoSourceCL::enableLocationManagerPaolo Angelelli2018-09-181-1/+33
| | | | | | Task-number: QTBUG-52660 Change-Id: I528bde71dd0ad5ad58e26a9d484364b35b6c4b62 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Improvements to geoclue2 pluginAki Koskinen2018-09-172-80/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relies on automatic service activation: https://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-starting-services This means that the service isn't explicitly started but gets started automatically when a request to the service is made. It's also possible that the geoclue2 service gets shutdown during runtime (for example when no client is requesting updates for some time). Automatic service activation ensures, that the service gets (re)started whenever needed. Create the manager interface right in the constructor as there's no benefit in creating it lazily. Also, since automatic service activation is used, m_manager->isValid() can't be used, because it always returns false until the service has been (automatically) started. Always return correct values from supportedPositioningMethods(). The use of the m_manager->availableAccuracyLevel() shorthand helper doesn't tell the difference between an invalid property (for example if geoclue2 isn't available at all) and GCLUE_ACCURACY_LEVEL_NONE since both return 0. Getting the QVariant of the property is needed to distinguish those cases. An invalid QVariant means that we couldn't communicate to geoclue2. A QVariant that can be turned into 0 means GCLUE_ACCURACY_LEVEL_NONE. In this commit GCLUE_ACCURACY_LEVEL_NONE is also correctly turned into NoPositioningMethods. If client doesn't exist when startClient() is called, create a client first. It's also possible that a client is crerated more than once during runtime. For example, when the above mentioned automatic geoclue2 service shutdown takes place, the old client is no longer usable. Now in this case the old client gets discarded and a new client is created. Call startClient() in startUpdates() – because otherwise startUpdates() wouldn't really work. Remove the warning message from the beginning of configureClient(). It's quite OK that configureClient() gets called before m_client exists (it just doesn't do anything then). This was probably in place with the assumption that setUpdateInterval(), setPreferredPositioningMethods() and startUpdates() would get called in some specific order. But no such assumptions can be made. Delete client interface object once it's not usable anymore (either gives an error or is explicitly stopped). This way, a new client gets created once a client is needed again. Other minor changes: - In startClient(), check whether starting the client is needed before doing it. This removes the need to do any checks before calling this function. - In stopClient(), check whether stopping the client is OK before doing it. This removes the need to do any checks before calling this function. - Use QPointer for the D-Bus interface objects -> no need to set the pointers to nullptr after deletion. - Add explicit casts to few places that gave implicit signedness change warnings. Change-Id: If9db25775710fe64f272db222030e481533d9732 Reviewed-by: Volker Krause <volker.krause@kdab.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-181-2/+2
|\ | | | | | | Change-Id: I001477f8534dd8eb565a365143c5799834df56ff
| * Geoclue: respect minimum update interval for satellite info updatesChris Adams2018-08-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | If no update interval is specified for the Geoclue-backed satellite info source, it should use the minimum update interval (which is defined in the code as being one second) rather than zero, otherwise the satellite information is reset immediately after receiving an update from Geoclue. Change-Id: Ib48b8dfd600722f23c8bafc50adabfb5df546eaa Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Long live for the geoclue2 position pluginDenis Shienkov2018-08-1612-0/+1149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Geoclue2 requires the appropriate application's desktop id, to allow an access to the location service. This desktop id should be added to the /etc/geoclue/geoclue.conf file, e.g.: [my-app] allowed=true system=true users= Also, this desktop id should be imported to the Geoclue2 application via the QT_GEOCLUE_APP_DESKTOP_ID environment variable, e.g.: export QT_GEOCLUE_APP_DESKTOP_ID=my-app Note: Tested on stationar PC with the ArchLinux. Task-number: QTBUG-43435 Done-with: Volker Krause <vkrause@kde.org> Change-Id: I5cc204cca966cb23a59ccffbc83fd8dc7a7c4eb6 Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-06-121-1/+1
|\ \ | |/ | | | | Change-Id: Id27e5a31f3a72eac38b976d546a1f733226cd5ae
| * Enable serialnmea positioning plugin everywherePaolo Angelelli2018-06-061-1/+1
| | | | | | | | | | | | | | And not only on win32 Change-Id: Ibd55751678bba0f55b680912746d691684473d8e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-053-9/+0
|\ \ | |/ | | | | Change-Id: If5e87356cdb8668fc66612099be2b9a1deae5cfd
| * Declare/Register metatype for QGeoPositionInfoPaolo Angelelli2018-03-233-9/+0
| | | | | | | | | | | | | | | | | | | | Instead of doing it all over the place, declare it in qgeopositioninfo.h and register it in QGeoPositionInfoSource() as well as in positioning.cpp Task-number: QTBUG-65937 Change-Id: I819af3393921bdc9ca46832d5b4181d41546dac0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Clean up our Objective-C usageLiang Qi2018-03-091-5/+5
|/ | | | | | | | | | | Following ba871065e0f40e9197fa4ee0ffe76530bb6fca11 in qtbase. - Move ivars into @implementation - Use instancetype where applicable Change-Id: If87a3c17d553d98d93c23b319a391c763e2a6bdc Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add .mm to DISTFILES if not on MacPaolo Angelelli2018-03-051-0/+4
| | | | | | | So that the files can be found by qtcreator. Change-Id: I00b0cbcd711b413221a4486234aba8b1c5757cb6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-192-14/+19
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/location/declarativemaps/qdeclarativegeomap.cpp src/location/maps/qgeomap.cpp src/location/maps/qgeomap_p_p.h src/location/maps/qgeorouteparserosrmv5.cpp src/location/maps/qgeotiledmap.cpp src/positioning/positioning.pro Change-Id: I42f8b176a8f3e824c7fe5b067a958735173f0dbb
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-262-14/+19
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/qgeotiledmap/tst_qgeotiledmap.cpp tests/plugins/declarativetestplugin/testhelper.h Change-Id: Ie218ab1dc68642a6922e05e5688c20b90440b72e
| | * Apple platforms: properly guard API access when requesting location infoJake Petroules2018-01-022-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | requestAlwaysAuthorization and requestWhenInUseAuthorization are prohibited APIs on macOS, and the former is also prohibited API on tvOS. This means they are akin to private APIs and must not be called under any circumstances. The respondsToSelector calls are also removed as Qt no longer supports OS versions where thee methods are not available, and in any case such uses should be replaced with __builtin_available. Background location updates are also now made available on watchOS 4 and above. Change-Id: I817d69f4ec71b96f03dda42635d675499e8908c0 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
* | | Replace Q_NULLPTR with nullptrKevin Funk2018-02-051-3/+3
| | | | | | | | | | | | | | | Change-Id: Icbebfaae93cc5827d80ef09323ec82868789838a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Replace Q_DECL_OVERRIDE with overrideKevin Funk2018-02-053-20/+20
| | | | | | | | | | | | | | | Change-Id: Iaa670de181255ea570fcf7bcbe465987ef7fc2fc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2017-11-202-4/+7
|\ \ \ | |/ / | | | | | | Change-Id: I9adfdf056dd04f33e9fbd01bcb2ca2ad75e95007
| * | Update to new QRandomGenerator APIv5.10.0-beta4Thiago Macieira2017-11-031-2/+2
| | | | | | | | | | | | | | | Change-Id: I69f37f9304f24709a823fffd14e676c097712329 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta3Liang Qi2017-10-261-2/+5
| |\ \ | | |/ | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I9a3d7ec0bb203ac8b5bd483af3973510ca33c4a9
| | * Android: check positioning listener not nullVyacheslav Koscheev2017-10-241-2/+5
| | | | | | | | | | | | | | | | | | Change-Id: I8b491dc1a3b9056c9a15d6814b72e52e37132dda Reviewed-by: Sergey A. Galin <s.galin@2gis.ru> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Android: remove support for local/debug deploymentJake Petroules2017-09-064-22/+16
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the pre-dexed JAR files activated by the absence of the bundled_jar_file CONFIG option, as versions of Android >= 5 no longer support this deployment mechanism. Now, the "bundled" JARs simply become normal JARs containing class files, and are neither activated by a bundled_jar_file CONFIG entry nor do they have a -bundled suffix in the file's base name. Task-number: QTBUG-62995 Change-Id: Ie562ba8120c38ef2c0be546db8f0ce65718816f4 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-07-061-0/+4
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3241efba9c3a32a4a097a67fd6432c45aad8e6ef
| * Android: fix resolving null locationManagerVyacheslav Koscheev2017-06-291-0/+4
| | | | | | | | | | | | Change-Id: I5be4c3af8cedd6755296bc9b445562549784c050 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Use QRandomGenerator instead of q?randThiago Macieira2017-06-301-3/+3
|/ | | | | Change-Id: Icd0e0d4b27cb4e5eb892fffd14b5285d43f4afbf Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* gypsy: fix initialization order warningShawn Rutledge2017-05-121-1/+1
| | | | | | | | | | | | | | | | | | | Warnings are fatal nowadays. In file included from qtlocation/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp:40:0: qtlocation/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h: In constructor ‘QGeoSatelliteInfoSourceGypsy::QGeoSatelliteInfoSourceGypsy(QObject*)’: qtlocation/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h:136:12: error: ‘QGeoSatelliteInfoSourceGypsy::m_requestOngoing’ will be initialized after [-Werror=reorder] bool m_requestOngoing; ^~~~~~~~~~~~~~~~ qtlocation/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy_p.h:134:14: error: ‘QTimer QGeoSatelliteInfoSourceGypsy::m_requestTimer’ [-Werror=reorder] QTimer m_requestTimer; ^~~~~~~~~~~~~~ qtlocation/src/plugins/position/gypsy/qgeosatelliteinfosource_gypsy.cpp:143:1: error: when initialized here [-Werror=reorder] QGeoSatelliteInfoSourceGypsy::QGeoSatelliteInfoSourceGypsy(QObject *parent) : QGeoSatelliteInfoSource(parent), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I69b7923ce97a66baaee4e24b075e4d942e3e15f5 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix build for -no-feature-temporaryfileStephan Binner2017-04-251-1/+1
| | | | | Change-Id: Ic269e15b8044e319ff095cc758f20ebc02dda714 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* winrt: Add error handling for GeoPositionInfoSource creationOliver Wolff2017-04-243-8/+26
| | | | | | | | | | | If something goes wrong while creating the source, the factory should return a nullptr (same as in QGeoPositionInfoSourceFactoryGipsy). One such error might be, that access to location is denied on first application start. Task-number: QTBUG-60299 Change-Id: I50e87895a74bcff856aa29a195762a83466bc5b9 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* CLLocationManager - allow background updatesTimur Pocheptsov2017-03-171-0/+16
| | | | | | | | | | | | To allow background updates, on iOS we have to enable this capability in the app's plist + also set a property on CLLocationManager. [ChangeLog] Allow background updates if such capability is present in infoDict Task-number: QTBUG-52014 Task-number: QTBUG-59275 Change-Id: Ifadfbf9a35919912895b3515348d55afa97173c3 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Set UTC flag for Android position timestampsAlex Blasche2017-03-141-1/+1
| | | | | | | | | | The platform provides the data in UTC time. However the default QDateTime::fromMSecsSinceEpoch creates the timestamp in LocalTime by default. The patch corrects the Timespec for the time stamp. Task-number: QTBUG-59158 Change-Id: Iaeceb0de2273b40a1815959b514d702670180aba Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Guard against unprotected javaVM pointer usageAlex Blasche2017-03-091-1/+1
| | | | | | Task-number: QTBUG-59010 Change-Id: Iea5f160718fd668665d4870fe1b82d608cf13d8c Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix -Wreorder warningPaolo Angelelli2017-03-072-4/+4
| | | | | Change-Id: I5fcc43f3164e0eb83d1504e892d0ede9d54fe3ae Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove moc_* inclusions from source filesPaolo Angelelli2017-02-144-6/+0
| | | | | | Change-Id: I7385348d7b6ec22fa92ed1be65f89e262c38b5c0 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-144-4/+4
|\ | | | | | | | | | | | | Conflicts: src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp Change-Id: I2428d360c07b55ec5ee61f81c6f97b3d7b20f363
| * Set parent to timers in position pluginsVyacheslav Koscheev2017-02-074-4/+4
| | | | | | | | | | | | | | | | | | QTimer can be started and stoped only from owner thread. So, if we'll do moveToThread for parent object, then we need QTimer to have a parent to change its owner thread too. Change-Id: Iac57d42b6e72118f31d93f15662403f681925f88 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Remove support for WinRT 8.1 and Windows Phone 8.1Maurice Kalinowski2017-01-191-8/+3
| | | | | | | | | | | | Task-number: QTBUG-57288 Change-Id: I8ae2e044d6e4db0664cc81e216a5db505530687b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'gerrit/5.8' into devAlex Blasche2016-12-051-2/+19
|\ \ | |/ | | | | | | | | | | | | | | | | | | Conflicts: src/imports/location/qdeclarativegeomap.cpp src/location/maps/maps.pri src/location/maps/qgeomap_p_p.h src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp src/plugins/geoservices/osm/qgeoroutereplyosm.cpp Change-Id: I18d31cff9233648178fe3e2636ce294026dfaeb7
| * Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-281-2/+19
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/position/winrt/qgeopositioninfosource_winrt.cpp Change-Id: I44fd4bd47f97acd7ca5a0bdb235a701a59497528
| | * Merge remote-tracking branch 'origin/5.6' into 5.75.7Liang Qi2016-11-241-2/+19
| | |\ | | | | | | | | | | | | Change-Id: I49b1b3fc94819b5a7f2fd1ab2481a1d8ea41586b
| | | * winrt: Use backend provided timestampsMaurice Kalinowski2016-11-041-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IGeoCoordinate does provide a timestamp in system time. This value should be used to provide a timestamp to be forwarded to the user. In case the information provided is invalid, an invalid QDateTime is used for the position update. Task-number: QTBUG-56623 Change-Id: If476b41e5fd183edf33742d8e4401236a32c6037 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | | Merge remote-tracking branch 'gerrit/5.8' into devAlex Blasche2016-11-038-26/+32
|\ \ \ \ | |/ / / | | | | | | | | Change-Id: I3598004c8d947f42c499137c7767cfcb91643082
| * | | Fix the direction of arguments in signalsThiago Macieira2016-11-022-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signal arguments are "out", not "in". There was a bug in qdbusxml2cpp that required the wrong one (in), but it's been corrected. Adapt so qdbusxml2cpp doesn't print annoying warnings. Change-Id: Ic46ff326a6ba46bc877cfffd148321381b15ae19 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>