summaryrefslogtreecommitdiff
path: root/src/positioning
Commit message (Collapse)AuthorAgeFilesLines
* Fix QHash/QMultiHash related deprecations warningsAlex Blasche2020-04-022-7/+7
| | | | | Change-Id: I5ec9c700a0b69a556512efbd0bfd79c4c2119f9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Enable mercator-to-screen projection in GLSLPaolo Angelelli2020-02-112-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, all the geo-to-screen conversion, and the triangulation operations for geo polylines and geo polygon are performed either at set time or in the shader. A separate bounding box geometry is processed in the old way to provide a correct QtQuick Item geometry, that can be used for nesting mouse areas, performing translations, input event delivery, etc. With this approach, performance are improved by more than one order of magnitude in average, but complex geometries will of course benefit more. It also adds correct rendering support for polygons with holes, previously only rendered correctly by the MapboxGL plugin. The polyline shader has basic miter joins. The miter is skipped if the angle is too sharp to avoid complicating the implementation. This shader introduces some glitches when the polyline is minified, for which the real fix is to have LOD for the geometry, and render simplified geometries at low zoom levels (added in a subsequent patch). Note: this approach, at least in its current implementation, does not support enabling layers on individual items, only on the Map element. Task-number: QTBUG-49303 Task-number: QTBUG-38459 Change-Id: I0c2dc0bf364d32f74ca7c4014f6d66e6219c8ae4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Fix QGeoPolygon translate not updating clipper cachePaolo Angelelli2020-02-033-23/+80
| | | | | | | | | | | | | | | Problem resulting in failure when calling the contains() method. This patch caches the leftbound that is used in many other methods. This patch also fixes the copy constructor, now correctly converting rectangles and circles into polygons. Tests are added in a subsequent patch. [ChangeLog][QtPositioning][QGeoPolygon] Fixed contains method. Change-Id: I324e5a6e9bf981f830a8bb88e5f2abedb5ece5dd Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-011-1/+3
|\ | | | | | | Change-Id: Iae2b08cdf4f64d69bedeabf4633fd34b44a02ad0
| * Android: request permissions before location requests or updatesAssam Boudjelthia2020-01-291-1/+3
| | | | | | | | | | | | | | | | | | 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>
* | Fix QGeoCoordinate::CoordinateFormat missing Q_ENUMPaolo Angelelli2020-01-301-0/+1
| | | | | | | | | | Change-Id: Iefab6ee7738f422de9d491f70e7461b30e73c624 Reviewed-by: Alex Blasche <alexander.blasche@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>
* Doc: Fix documentation warningsTopi Reinio2019-11-145-6/+4
| | | | | | | | | | | | | Fix missing/incorrect parameter documentation, linking warnings, and \instantiates references to undocumented/internal classes. Remove mention of Navigator::currentRoute, as such a property no longer exists. Fixes: QTBUG-79811 Change-Id: I048a13109aa19f3db75e76611473d60a2396f028 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix flakiness of QGeoPositionInfoSource::createDefaultSource()Szabolcs David2019-10-251-2/+5
| | | | | | | | | | | | | After ac899dcc4, createDefaultSource() uses the first available position plugin to create an info source - even if that is not valid. The non-deterministically sorted list of plugins results a flaky behavior, especially when two plugins (geoclue2 and serialnmea) have the same priority and one of them is unconfigured and not supposed to work. Bring back the ability to find the first valid position plugin. Change-Id: I82947e59252ac3727478fe14fd328338b54b4dea Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix library namev5.14.0-beta1BogDan Vatra2019-10-011-1/+1
| | | | | | Fixes: QTBUG-78616 Change-Id: I06d5291a9bb388483c58464d86ca5a2a9692f99a Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-013-8/+14
|\ | | | | | | Change-Id: Id543d32c49c8efd1d7798d41bbee0e28c1742e12
| * Doc: Fix link errors and complete parameter specsNico Vertriest2019-09-303-8/+14
| | | | | | | | | | Change-Id: I786ab35a0e9c8dfa2c8124692289d98e8eee4a8d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-241-4/+4
|\ \ | |/ | | | | Change-Id: Ie8e4e01faad54b7a38aa3b96a769c4893a5cfb58
| * Doc: Fix link to Qt for UWP docs in Qt Positioning module docsLeena Miettinen2019-09-201-4/+4
| | | | | | | | | | | | | | Change-Id: Ic739e3d7fe4df81e97be77c4294aa422dfcd6344 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Fix 5.14 positioning APIsPaolo Angelelli2019-09-195-6/+45
| | | | | | | | | | | | | | | | This patch fixes a few inconsistencies in the newely added features. Change-Id: Icdf1c9208fd0d5ab1d6ec6d87fcc5be5072c3f58 Fixes: QTBUG-77865 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add Satellite support to serialnmea pluginPaolo Angelelli2019-08-158-53/+390
| | | | | | | | | | | | | | | | | | | | | | 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-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Allow setting backend properties of positioning pluginsPaolo Angelelli2019-07-243-1/+65
| | | | | | | | | | | | | | | | | | | | This change adds a pair of setter/getter to specify positioning backend properties at runtime, both in QGeoPositionInfoSource and QDeclarativePositionSource. Task-number: QTBUG-66304 Change-Id: Iea9421fb708879bee5c62c4afaf45cbda57f50bb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-171-0/+1
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I4f76eed0a59b602696c3f2c1c76df75246c69092
| * Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-07-091-0/+1
| | | | | | | | | | | | Task-number: QTBUG-74391 Change-Id: I80ad167400fc2c61c310adef8b00df70b42404dd Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Move PluginParameter into PositioningQuick, expose also in QtPositioningPaolo Angelelli2019-06-213-5/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch the QDeclarativeGeoServiceProviderParameter in the location-private module becomes QDeclarativePluginParameter in the positioningquick-private module. This renamed class is then registered, under the same QML typename "PluginParameter" both in QtPositioning and QtLocation qml plugins. In this way it will become possible to use the same type both inside QtLocation "Plugin" and inside QtPositioning "PositionSource", and regardless of which is the QML plugin that provides "PluginParameter", this will translate into the same cpp type. [ChangeLog][QtPositioning] Exposed PluginParameter also from QtPositioning qml plugin, to be used in PositionSource as replacement of environment variables. Task-number: QTBUG-66304 Change-Id: I1d982ff689130ae896c616480567aa12d9b49c3a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Introduce QGeoPositionInfoSourceFactoryV2Paolo Angelelli2019-05-115-31/+93
|/ | | | | | | | | | | QGeoPositionInfoSourceFactoryV2 exposes factory methods that accept plugin parameters as argument, and can be used to configure a given plugin when requesting a source. Task-number: QTBUG-66304 Change-Id: If93a0746fddc6ff4074e771db1376c3b3fc67122 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-011-0/+4
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5700c90ee86873599b5e7c9ccb6cef7ca48153e7
| * Document QGeoPath::length behaviorPaolo Angelelli2019-03-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | By default, the method computes a closed-loop length. Being this public API, the only thing that can be done is to properly document the behavior. [ChangeLog][QtPositioning] Documented QGeoPath::length behavior properly. Change-Id: Ie48a51ab0d11ec68851c2ea26b8c6f6894be8b61 Fixes: QTBUG-71358 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Introduce Qt.labs.location QtLocationLabs singleton typePaolo Angelelli2019-03-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | This singleton is meant to offer tech-preview map-related API. It starts with a mapObjectsAt invokable, that can be used to probe MapObjects at a specific coordinate of a map. Reference implementation for Q*ObjectQSG, based on QGeoShape::contains, included. Change-Id: Ief692eb5a43115ca02d4642c82023d1b2e217400 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Introduce QGeoMapObject::geoShape propertyPaolo Angelelli2019-02-012-1/+1
| | | | | | | | | | | | | | | | | | | | In this way MapObjects become a little closer to MapItems, and this property can be used to, for example, center the map on one specific object or object group. Fixes: QTBUG-69640 Change-Id: I4dbead9e670bf5d1eeaccb2bd09d956b8de7da87 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Unify semicolon usage in Q_UNUSEDJesus Fernandez2019-01-232-3/+3
| | | | | | | | | | Change-Id: I36dd6881b6f6f028869d63b6311cba7f52a99cc4 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-221-18/+23
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I8d0881209c8b0a0dce4ed949ef89ee2679448420
| * Fix QGeoRectangle::operator|=Paolo Angelelli2019-01-141-18/+23
| | | | | | | | | | | | | | | | | | This patch fixes the case when one QGeoRectangle contains the second, and wraps around. Change-Id: I7110c1864082c502845754fab2dc4e783455a446 Fixes: QTBUG-72935 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2019-01-101-9/+49
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I0724ca9ffbb8099f698b090a4fdd993fad2c2302
| * Prevent potential blockage of setPreferredPositioningMethods()Alex Blasche2019-01-041-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful because on several platforms supportedPositioningMethods() returns NoPositioningMethods while the user has disabled the Location service. At the same time the platforms can only support dynamic supportedPositioningMethodsChanged() notifications after startUpdates() was called. Blocking changes to this property would have been counterproductive as startUpdates() would always fail and notification would not be possible. This affects at least WinRT and Android and Apple platforms need still further investigation. Task-number: QTBUG-66427 Change-Id: Ie03a3ef9c9476d7be3547661eaa87678fdb7b39c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
| * Improve QGeoPositionInfoSource::supportedPositioningMethods() docsAlex Blasche2019-01-041-4/+38
| | | | | | | | | | | | | | | | | | | | In particular the differing levels of support on various platforms needed documentation. Task-number: QTBUG-66427 Change-Id: I4c390d14ad69e2f1630e883c8f0a34cbca028a03 Reviewed-by: BogDan Vatra <bogdan@kdab.com> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-12-251-0/+28
|\ \ | |/ | | | | Change-Id: Ic8ccf43538ad411edce061f24f05c627dab50a6b
| * Register QGeoCoordinate debug streaming operatorAlex Blasche2018-12-211-2/+7
| | | | | | | | | | | | | | | | | | | | | | This enables the following code: QGeoCoordinate coord(foo, bar); QVariant v; v.setValue(coord) qDebug() << v; Change-Id: I3cc66c359d6be8b8ab9471170ae8763e08c3b3e9 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
| * Enable QVariant::save for QGeoCoordinateAlex Blasche2018-12-211-0/+23
| | | | | | | | | | | | | | | | Fixes: QTBUG-62682 Fixes: QTBUG-68331 Change-Id: Ibd08934e2b6da06a6b6ff24419e53b87fb2eaa20 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | QGeoPath/QGeoPolygon: defer bbox computationPaolo Angelelli2018-12-216-338/+770
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces 2 versions of QGeoPath/polygon private: a lazy version (default) and an eager version. The reason is that certain classes such as MapItems make heavy use of the bounding box of the geoshapes, as well as the contains method, and in those cases it's beneficial to have it eagerly computed and cached. Other use cases do not see this feature so much in use, and the added costs, both in terms of computation and in terms of memory requirements for cached data can be avoided. As the patch currently stands, using copy constructors for QGeoPath and QGeoPolygon with a QGeoPathEager and a QGeoPolygonEager (and vice-versa) changes the type of d_ptr. This means that doing, for example, QGeoPath(someQGeoPathEager) effectively returns a QGeoPath that behaves like a QGeoPathEager (although not being one). Change-Id: I8cfed1e0a747139d0fb6d5fb5236bf5f5fbf24c1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix comparison for QGeoPolygon: check holesPaolo Angelelli2018-12-111-1/+1
| | | | | | | | | | Change-Id: Ie817aebbb5fe52638cf26c4e583bb1ad08b71adf Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Check for validity before uniting geo rectanglesPaolo Angelelli2018-12-111-1/+2
| | | | | | | | | | Change-Id: Ibecff0e0823b321ed5fcdd149de1a9d542ee5b4a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-102-2/+2
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I00453b819d65460dabf771617e6181275461cc78
| * Merge remote-tracking branch 'origin/5.12.0' into 5.12Qt Forward Merge Bot2018-12-052-2/+2
| |\ | | | | | | | | | Change-Id: I53b052e12532392192d73da7006b204539cad57c
| | * QGeoPath: revert clear API to clearPathv5.12.0-rc2v5.12.0-rc1v5.12.05.12.0Samuel Gaist2018-11-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The original name was correct as clear would need to reset more properties which is was not the goal of this method. Change-Id: Iac43a61e4b8bf57220c88d627b33578612c4ddad Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Move declarative positioning classes to positioningquick, fix exportsPaolo Angelelli2018-12-045-781/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDeclarativeGeoLocation and QDeclarativeGeoAddress were incorrectly publicly exported (Q_POSITIONING_EXPORT) in QtPositioning, for using them in QtLocation (geocodemodel, declarativeplace), although they are private classes. This patch moves them into positioningquick, that, now that is available, is supposed to contain all the declarative positioning types. The patch also correctly privately export these types. Change-Id: I1bde17026fe122860e8977a98262c0707939c227 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | Provide extended, plugin dependent information for Geo LocationsPaolo Angelelli2018-12-045-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes support for osm geojson and class fields. At the present, the content of the geojson field is returned as is. As soon as QGeoJson support is finalized, this will be integrated with a QGeoPolygon. Fixes: QTBUG-43401 Change-Id: Ifa7e24cf904a2c1e1e77ebfaa7948ac0ce81d265 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-271-24/+30
|\ \ \ | |/ / | | | | | | Change-Id: I79898ba40dcce8054a105867ab2a88f1fba72c1f
| * | Doc: Make documented QML imports follow Qt versioningTopi Reinio2018-11-161-24/+30
| |/ | | | | | | | | | | | | | | | | | | | | We can now pass parameters to qdoc commands - use them to automate the version bumps for documented QML imports. Also, improve the structure and language on QML module pages. Change-Id: Id56d36a9bc550ab9a1aea1af6ff8da83e5e1feb9 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into devQt Forward Merge Bot2018-11-032-5/+15
|\ \ | |/ | | | | Change-Id: I219444e81a9b304b11b0cecce84415acdb3ade57
| * Merge remote-tracking branch 'origin/5.11' into 5.12.0v5.12.0-beta4Liang Qi2018-10-301-0/+3
| |\ | | | | | | | | | Change-Id: I0f4a3b7bc7c5c7f8da5af631000a6d5156884efe
| | * Fix crash when calling QGeoPath::length on empty QGeoPath instanceAlex Blasche2018-10-241-0/+3
| | | | | | | | | | | | | | | | | | | | | Fixes: QTBUG-71355 Change-Id: I47b058891a47cd6d020c4e192d40233c57814313 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
| * | Doc: Fix \code command usageTopi Reinio2018-10-251-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since Qt 5.12, \code command accepts parameters, and in-line usage no longer works (and was never documented to work). Also, use \badcode for qmake snippets to make it appear as plain text. Task-number: QTBUG-70980 Change-Id: I53cafdc912b4663d03c19b0a0003693330c94f15 Reviewed-by: Martin Smith <martin.smith@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>