summaryrefslogtreecommitdiff
path: root/src/location
Commit message (Collapse)AuthorAgeFilesLines
* Fix QHash/QMultiHash related deprecations warningsAlex Blasche2020-04-022-6/+6
| | | | | Change-Id: I5ec9c700a0b69a556512efbd0bfd79c4c2119f9a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta3Qt Forward Merge Bot2020-03-311-0/+4
|\ | | | | | | Change-Id: I8b84b78bf234556b7162066b8401630da2afb311
| * Support custom Mapbox API base URLsAlex Leung2020-03-241-0/+4
| | | | | | | | | | | | | | | | Added support for custom Mapbox API base URLs. Fixes: QTBUG-82655 Change-Id: Ieebcc834f8aeaeb223b036100e5edadd55749101 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-03-211-2/+2
|\ \ | |/ | | | | Change-Id: I72fa0c1d41db884c752820a8d1fb5a7aa55762bc
| * Doc: Fix highlighing of importKai Koehne2020-03-131-2/+2
| | | | | | | | | | Change-Id: Ifc34a27c89d7d8a63e66e9858f8e6dd3cd9522ab Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta2Qt Forward Merge Bot2020-02-291-1/+1
|\ \ | |/ | | | | Change-Id: I66502770edaa22deb2644ce5071df4894c4d0f97
| * Fix return type of doc for qmlmethod MapPolyline.setPathShawn Rutledge2020-02-251-1/+1
| | | | | | | | | | | | | | Fixes: QTBUG-82417 Change-Id: Id9be6f9e248612bce3a17a65d5f73f7ec4c9f45f Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix segmentation fault due to null pointer usagePaolo Angelelli2020-02-172-28/+39
| | | | | | | | | | | | Change-Id: I3b030728b32af6e340738583f78b2cfb0d2df11a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix crash with empty maps on constructionPaolo Angelelli2020-02-131-0/+2
| | | | | | | | | | Change-Id: I8716c94b2c3f1fb995e933fe5be736e94ff161ce Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add geometry simplification to MapPolyline/MapPolylineObjectQSGPaolo Angelelli2020-02-1213-32/+812
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a metric-based implementation of the Ramer-Douglas-Peucker line simplification algorithm to generate a LOD pyramid for the polyline geometries. This comes with a related property (in MapItemBase), lodThreshold, that can be used to change the threshold after which no simplification will be used. By default the value of this property is 0, meaning that the behavior will be unchanged and no LOD will be used. This change also introduces LOD on map polyine objects QSG, for which no property is introduced, and there's a default threshold set to zoom level 12 (which appear to produce acceptable results). Finally, this patch makes use of a threadpool with 1 thread to enqueue geometry simplification tasks, which would otherwise freeze the UI when computing for the first time. Support for geometry simplification is currently added only to polylines. It might be of interest extending it to polygons as well, once a proper strategy for handling the simplification of inner holes has been identified. Finally, extending it to circles could be of interest, while potentially bringing only minor benefits, as circle geometries are currently fixed to 128 vertices. Also adds a MapObject-based delegate to the geojson viewer example. Task-number: QTBUG-46652 Task-number: QTBUG-38459 Task-number: QTBUG-49303 Change-Id: I64b5db4577962db17e5388812909285c9356ef0d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | Port Map*ObjectPrivateQSG to the shader-based projection geometriesv5.15.0-alpha1Paolo Angelelli2020-02-1111-196/+421
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes the implementation of the scenegraph-based mapobjects (those created by QGeoTiledMap) to be the recently introduced one sporting shader-based map projection. This is much faster than the previous, but may introduce small glitches at this time (mostly on minified polylines). Adding polyline LOD simplification will solve this problem. Compared to equivalent Map Items (that is, Map Items backed by the same underlying implementation), map objects now are approximately 1.5x faster. This measure has been gathered using medium-size polygons (contained in the file 10_countries.json from the geojson_viewer example). The difference is caused by the additional QtQuick geometry related operations (essentially projecting the bounding box for each item) present in MapItems. Smaller polygons may therefore yield larger improvements, larger polygons the opposite. Change-Id: I3fc92b02b74a3a4d001e69755949a98f80d8a3d3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix Map*ObjectsQSG implementation triggering QSGBatchRenderer crashesPaolo Angelelli2020-02-116-24/+35
| | | | | | | | | | | | | | | | The new approach introduces a root node for all objects, that is repopulated at every repaint. Change-Id: I4562e1aaa18999a03e8c38fe3bf59fe41f14dd70 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Enable mercator-to-screen projection in GLSLPaolo Angelelli2020-02-1130-826/+4481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 MapObjectView not setting propertiesPaolo Angelelli2020-01-182-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | Set parent for incubated objects in MapObjectView to the view. Also properly set component completed when removing the view from a map and then readding it. Finally silence the useless warning about MapObjectView being unsupported, as the default MOV is basically what's wanted. Change-Id: Iecbc345ced99754d0d09112b4b30eaca2bb078e5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add parent property to QParametrizableObjectPaolo Angelelli2020-01-182-4/+41
| | | | | | | | | | | | | | | | | | | | | | Also emitting signals when the parent is changed internally (e.g., in a MapObjectView). Not revisioning it since it is used both in QtLocation and in Qt.labs.location, and setting it to 15 would break the property in map objects. Change-Id: Ib11b18b7fcc507b5a11481f84f2bf0bd8c9f558e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix MapObjects ::border property not properly initializedPaolo Angelelli2020-01-145-5/+5
| | | | | | | | | | | | | | This patch also parents it with the object also fixing memory leaks. Change-Id: I74a21176b1d2450b10a21f92321520ca2c6e88e0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-141-0/+1
|\ \ | |/ | | | | Change-Id: I0dc35c36208833779d26d5090859baf43199eb9a
| * Fix GCC 9 -Wdeprecated-copy warningThiago Macieira2019-12-111-0/+1
| | | | | | | | | | | | | | | | error: implicitly-declared ‘QGeoRouteLeg& QGeoRouteLeg::operator=(const QGeoRouteLeg&)’ is deprecated [-Werror=deprecated-copy] note: because ‘QGeoRouteLeg’ has user-provided ‘QGeoRouteLeg::QGeoRouteLeg(const QGeoRouteLeg&)’ Change-Id: Iad959315ad374ef288f5fffd15d68cba005f9e01 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>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-195-26/+25
|\ \ | |/ | | | | Change-Id: I95c7e221498d875eb407a3165c2b9e1be2a8b347
| * Doc: Fix documentation warningsTopi Reinio2019-11-145-26/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-122-7/+16
|\ \ | |/ | | | | Change-Id: Ifa572a6e1c0835e0ca6d5bf85cde1db854604cf6
| * Add image source support to Mapbox GL pluginTadej Novak2019-11-091-1/+1
| | | | | | | | | | | | | | [ChangeLog][QtLocation][MapboxGL] Added support for image sources Change-Id: I5334f36e033d26824300d90ad8d9aacf3ac75ac3 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
| * Fix visibleRegionChanged signal emissionv5.14.0-beta3Paolo Angelelli2019-11-041-6/+15
| | | | | | | | | | | | | | Emit on mapReady changed, and do not emit before then. Change-Id: I1d5c657119cb63989cfa35f58ce57d24833f6438 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-015-27/+44
|\ \ | |/ | | | | Change-Id: Ia876d943c684fbefddd693f00a16b2f2cec18223
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-11-013-26/+40
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I21ae20734645fc34b302409163f7400015d8302c
| | * Improve DynamicParameter documentationPaolo Angelelli2019-10-311-6/+8
| | | | | | | | | | | | | | | | | | | | | Change-Id: I2900e1ccc5291148fdc7801c1b6af43ea611db28 Fixes: QTBUG-78712 (cherry picked from commit 9ac4e00e21f5fd7a1a53343d1cf9f4fcaeff01a5) Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * Fix slow Map.removeMapItemPaolo Angelelli2019-10-312-20/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes connections in map items to react on map changes. A further improvement could be replacing item lists with QSets. This might however have implications with plugins which might expect ordered items. Change-Id: I52dbd64ed22762b1e2d51d1bc38f496346e7a664 Fixes: QTBUG-76950 (cherry picked from commit 2bb07804f32e0c9cc7948a5cff0bcef81ae9d8c9) Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Fix more 5.14 QML API inconsistenciesPaolo Angelelli2019-10-311-0/+3
| | | | | | | | | | | | | | | | | | Change-Id: Ia2dac783ce05bd87888b73b4225d133ada04af79 Fixes: QTBUG-78690 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-291-1/+1
| |\ \ | | |/ | | | | | | Change-Id: I1af75bedd02626b9fd121a04acfbb4418ce37d47
| | * doc: fix spelling of signal name "onFlickStarted"Rolf Eike Beer2019-10-241-1/+1
| | | | | | | | | | | | | | | Change-Id: Idc7cd6ad9f87e2fc511344bc4fc4b409da3b7f02 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-10-057-20/+50
|\ \ \ | |/ / | | | | | | Change-Id: I219a1353a21d29177e0cd7f21d64c06a8f28fced
| * | Fix 5.14 QML API inconsistenciesv5.14.0-beta2Paolo Angelelli2019-10-042-1/+28
| | | | | | | | | | | | | | | | | | Change-Id: I54bf3791d3d5e40fb9405c2f1527758fcfba8120 Fixes: QTBUG-78690 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-015-19/+22
| |\ \ | | |/ | | | | | | Change-Id: Id543d32c49c8efd1d7798d41bbee0e28c1742e12
| | * Doc: Fix link errors and complete parameter specsNico Vertriest2019-09-305-19/+22
| | | | | | | | | | | | | | | Change-Id: I786ab35a0e9c8dfa2c8124692289d98e8eee4a8d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Add optional argument to Map.fitViewportToMapItemsPaolo Angelelli2019-09-262-16/+32
|/ / | | | | | | | | | | | | | | So that a user-specified list of items can be fitted without requiring complex computations in JS to deduct the enclosing geo rectangle. Change-Id: I4a36fe72a49d5fc3566ba0b9fe1db930c4008885 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Replace the deprecated QWheelEvent::posF() -> QWheelEvent::position()Sona Kurazyan2019-08-211-2/+2
| | | | | | | | | | Change-Id: I0aa13b6c472664ad2c6175fa800687598207ab8e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add autoFadeIn property to map itemsPaolo Angelelli2019-08-217-1/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This property allows a user to disable the until now built-in behavior that makes map items fade in or fade out between zoom levels 1.5 and 2.5. By default the old behavior is kept. [ChangeLog][Location][MapItems] Added property to disable the automatic fade-in/fade-out behavior on low zoom levels Change-Id: Id764f12d34db528f533f14fd561604507681f216 Fixes: QTBUG-76867 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-08-034-29/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and of QLinkedList Java-style iterators are going to be deprecated, or at the very least banned from use in Qt code. Ditto QLinkedList. Unfortunately, the module contains more than 120 uses of Q_FOREACH, even though, according to my sources, its use was banned in Qt implementation from the get-go. So QT_NO_FOREACH is currently not an option. Change-Id: I0f05e9c78dda259b0eac1bcdfc7dddfcddc4b908 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | QDeclarativeGeoMapParameter: replace the last use of QSignalMapper in the moduleMarc Mutz2019-08-011-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code here is a bit tricky, as it relies on dynamic property inspection, and therefore can't use the statically-typed Qt5 connection syntax to simply connect to a lambda to captures 'i' by value. But QSignalMapper is not just deprecated, its use here is also overkill. Unlike your normal signal mapper, the code doesn't map many source objects to different ints, there is actually one QSignalMapper object _per sender_. But this use-case doesn't need all the sender() inspection that QSignalMapper does under the hood. It just needs a QObject with a map() slot that emits mapped(i), where 'i' is a member variable. Implement that. Change-Id: Ib363144c8ab7997cb0a34c8c9c1a0c348fd38d57 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.13' into dev"Qt Forward Merge Bot2019-07-171-0/+1
|\ \
| * \ 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>
* | | Fix compilation after recent declarative internal header changesSimon Hausmann2019-07-174-0/+8
|/ / | | | | | | | | | | | | | | | | | | Some types of the private declarative API became visible through implicit header file inclusion from qqmlengine_p.h. This was changed in declarative and requires fixing here, but it's backwards build compatible to before the changes in declarative. Change-Id: I3553fada4363e88191c127f9cabae2169916ae46 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | QDeclarativeSearchResultModel: modify a map's value in-place instead of ↵Marc Mutz2019-07-101-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | overwriting More efficient, because the copy taken from the element in the container must needs detach on the remove call. Calling remove on the element in the container, OTOH, requires no detach (unless the page is otherwise shared, of course). The old code wouldn't detach the whole map when the int was out of range, but that's not the normal case. Change-Id: I2febd591ff78cea86949aa068938a3be4ca115f0 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | QDeclarativeSupportedCategoriesModel: don't use a QMap just to sort a containerMarc Mutz2019-07-101-11/+11
| | | | | | | | | | | | | | ... use std::sort() Change-Id: I2b40f475f44b41a9f0540602085f0a430eed9508 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Expose alternativeRoutes in QDeclarativeNavigationBasicDirectionsPaolo Angelelli2019-07-094-1/+76
| | | | | | | | | | | | | | | | So that they can be also visualized in list views or details can be presented. Change-Id: Ib8bb48e73624d8bb50073312e7834c3c609c561b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Expose recalculateRoutes invokable method in NavigatorPaolo Angelelli2019-07-093-0/+9
| | | | | | | | | | | | | | | | This to let the user choose when to do it, if automaticRerouting is disabled. Change-Id: I53251dc42fc831da623f135ff3f1c372ee3dac66 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Expose automaticReroutingEnabled and isOnRoute properties in NavigatorPaolo Angelelli2019-07-034-0/+48
| | | | | | | | | | | | | | | | | | | | This patch adds these two properties to the Navigator API to let the user know when the engine detects that the position source gets off the route and to choose whether or not let the engine automatically recalculate routes in that case. Change-Id: I1f3afc8820dee1dd2042aa05fb0b3284108cb581 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Move PluginParameter into PositioningQuick, expose also in QtPositioningPaolo Angelelli2019-06-212-96/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>