summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove parameterization functionalityVolker Hilsheimer2022-11-0227-1345/+20
| | | | | | | | | | | | | | | | | | | | | The abstraction of plugin-specific parameters makes little sense if we don't want to provide a cross-backend API. So remove this for now. If in the future we want to attach meta-data or backend-specific properties to values or element types, then we might be able to use existing QVariantMap type properties (like QGeoRouteRequest's extraParameters, via QDeclarativeGeoRouteQuery::extraParameters), or register backend specific QML types that applications can opt in to use. This requires a bit of research and experimenting based on specific use cases. If we can't come up with anything better, then bringing back a, perhaps simplified, version of the infrastructure removed here will still be an option. Change-Id: If590a35f2ffb80b0c918d866e88913a9caf75d2b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Clean up: make getters in QDeclarativeGeoRouteQuery constVolker Hilsheimer2022-11-022-9/+9
| | | | | | | | Declare lazily updated data as mutable. Change-Id: I43c445c569e6499d28c0b3686efdfb9cc146d496 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Enable syncqt cppAlexey Edelev2022-11-011-0/+2
| | | | | | Change-Id: I100f1fc8bec5032d16ba43702ba1f8802f270a1c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Manually update dependencies on 'dev' in qt/qtlocationVolker Hilsheimer2022-11-011-3/+3
| | | | | Change-Id: Ib35826db79d8ed03a575a0b1e4c7f1af8a940e6b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Disable Esri/Nokia/MapBox pluginsVolker Hilsheimer2022-10-257-89/+113
| | | | | | | | | | | | | As a first step, put them behind feature flags that are always false. Remove mapbox-gl-native as a submodule - there's no reason why people wanting to build that can't clone and build that repo themselves. Don't test the respective providers unless they are available, and use the osm plugin when testing the basic plugin framework. Change-Id: I53429878e53294dce52ee830a4b4613f372898c6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Manually update dependencies on 'dev' in qt/qtlocationVolker Hilsheimer2022-10-201-3/+3
| | | | | Change-Id: I60d3f59a78386b7bb72b00da538682d651181a65 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Document more type changesVolker Hilsheimer2022-10-131-7/+12
| | | | | | | | | | | Add routeManeuver and cameraCapabilities to the list of types that are now value types. Clarify language - in Qt 6.5, value types can be instantiated through properties. Complete unfinished statement about MapObjects being gone. Change-Id: I0828d5af7823d7d907bf5fa21a7250ebd70189d1 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Remove leftover labs things from build systemVolker Hilsheimer2022-10-131-7/+0
| | | | | Change-Id: I934f07b0bb1f35fdae295ec57e760ebbaa64fe2e Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Remove unneeded qmake file for zlib dependencyVolker Hilsheimer2022-10-131-6/+0
| | | | | Change-Id: I3b9e9277a8a49159d3c6668d79ffc0292cb15967 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Manually update dependencies on 'dev' in qt/qtlocationVolker Hilsheimer2022-10-121-3/+3
| | | | | Change-Id: I2817d8f95ae89be4590fad6c9e1951f7f836aadc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Doc: we don't guarantee compatibility for backend classesVolker Hilsheimer2022-10-126-5/+33
| | | | | | | | | | Similar to QPA, we want to continue to develop the backend APIs between minor releases. Loading a plugin that uses a different Qt version than the application is anyway a bad idea (if supported at all), and for Qt Location specifically we don't want to support this. Change-Id: Ib8b159e1df391bc5a474ddccb6933ab80529264f Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Update changes documentationVolker Hilsheimer2022-10-111-1/+7
| | | | | | | Labs functionality has been removed, and RouteLeg is folded into Route. Change-Id: I3a5003d1f35482637391cb37b88b4a5afd68ea93 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Fix typo in exampleVolker Hilsheimer2022-10-101-1/+1
| | | | | | | | Amend d8f03e5e71de3d951f86f0b0413fd75d554b2039. Change-Id: I4b2c652f73d1fd5fb5ffecc621f0a7e94fb70498 Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Disable copy and move for private, polymorph typesVolker Hilsheimer2022-10-068-73/+27
| | | | | | Change-Id: I373e324cbe96d0ae34cba62a105bea8a7fdb83dd Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move the RHI implementation into separate folderVolker Hilsheimer2022-10-0627-2280/+2950
| | | | | | | | | Makes it easier to work with the code, the implementations have little in common that is not anyway abstracted into the common private base class. Change-Id: I4d957833f5a881e1b445ff6e912ffa036d10321a Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* tst_QGeoTiledMap: fix memory leakIvan Solovev2022-10-061-4/+6
| | | | | | | | | Use std::unique_ptr to manage QGeoServiceProvider object's lifetime. We cannot create the provider on the stack because it must outlive the child QGeoTiledMap instance. Change-Id: Ic2275fda394175bcb2a7782f887c10326f4c72a0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* tst_QPlaceSearchRequest: fix memory leakIvan Solovev2022-10-061-5/+5
| | | | | | | No need to dynamically create the QPlaceSearchRequest instance. Change-Id: If82213b2019741ae302be2b67b71d56187822bda Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Clean up: move code into right place, remove dead codeVolker Hilsheimer2022-10-067-61/+35
| | | | | | | | | | | QGeoMapItemGeometry::geoDistanceToScreenWidth was unused, so remove it. Move path/pathMercator projection helpers to QGeoMapItemGeometry, they are used in items other than the rectangle items. In mapbox plugin, call static helper from correct class. Change-Id: I5645f503a24e23e295211da32e98f995b8c17b56 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Cleanup: move CPU item implementation into cpp fileVolker Hilsheimer2022-10-068-363/+403
| | | | | | | | This will make it easier to split the RHI implementation out into separate files. Change-Id: I4173b46871ba1e84310f9f6bebaae7754879b70b Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Manually update dependencies on 'dev' in qt/qtlocationVolker Hilsheimer2022-10-051-3/+3
| | | | | Change-Id: Ia30e5a8b2d85da4eac6d407c42e41600978aff02 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Register QGeoRoute as QML value type, remove QDeclarativeGeoRouteVolker Hilsheimer2022-10-0414-554/+231
| | | | | | | | Adapt model and tests accordingly. Fixes: QTBUG-106482 Change-Id: Ie5a36e4fef17ae7bc4ecfab9187a325fb025e283 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Mark documentation for item's backend property as internalVolker Hilsheimer2022-10-044-0/+4
| | | | | | | We don't want to support selecting backends. Change-Id: Ie95877fe647f237dd834fdcd22cbb3ed52dcacac Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Declare value types as structured values, remove workaroundsVolker Hilsheimer2022-09-3017-152/+33
| | | | | | | | Use QML's new support for initializing structured values, adjust tests, and remove the now unnecessary conversion functions. Change-Id: I7007c9acb50f4a9532a9eed847b1b4dd0928ba34 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Manually update dependency to latest revision of Qt PositioningVolker Hilsheimer2022-09-291-1/+1
| | | | | Change-Id: I06851df7d98968698397eaecd3c12c038fbe7a23 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Build system: move to declarative type registrationVolker Hilsheimer2022-09-2845-501/+321
| | | | | | | | | | | | | | | | | | | | Adjust the build system accordingly, attaching a QML module with the respective implementations to the QtLocation target. An explicit function is still needed to register converters, and will be removed once the improved support for value types has merged. This should enable the qml compiler to generate C++ code, which then requires linking against the library. The MapParameter type was renamed to DynamicMapParamter as per the 5.11 change log, so remove the MapParameter alias now and adjust tests. Task-number: QTBUG-106886 Change-Id: Id8765c1bc3b98d447d768b246b21a16f71bfdf74 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Cleanup: QGeoServiceProviderVolker Hilsheimer2022-09-262-77/+57
| | | | | | | | | | | | Use member initialization and std::unique_ptr instead of explicitly initializing pointers. Clean up the creating helper template, it doesn't need a pointer to the existing manager, but don't call it if the manager is already created. Change-Id: Ia45587cbd36838f1fcdfbb0407100391f0977300 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Remove turn-by-turn navigationVolker Hilsheimer2022-09-2618-2173/+0
| | | | | | | | | | | It is unfinished and untested, with no support from any backend. This was the last bit of functionality in the labs module, so remove that entirely, including the QML plugin and the now unused QParameterizableObject type. Change-Id: Ic448e643cb345d1da877137a673ab572c836b3fe Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Build system: fix requirementsVolker Hilsheimer2022-09-261-17/+5
| | | | | | | | | ShaderTools are strictly speaking required as well, but we might be able to make them optional if the RHI based item implementations get moved out. Change-Id: I3daa5ebbc8218f85fc18f608b94667de14601096 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Simplify Q(Declarative)GeoMapParameterVolker Hilsheimer2022-09-2611-151/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | Move the initialPropertyCount to the QGeoMapParameter class, where previously the 2 was hardcoded. Don't make type/setType virtual, as the subclass doesn't override those methods anyway. Remove the unused constructor taking a list of property names and values. In QDeclarativeGeoMapParameter, optimize the dynamic connections between property notification signals and the generic forwarder. Connect between QMetaMethods, which avoids the repeated lookups, and give the SignalMapper instances the QMetaProperty as a data member so that we avoid the lookup of the signal for each signal emission, and only need one connection per property, rather than two. Also, remove the empty destructor and apply const where appropriate. QDeclarativeGeoMapParameter is used only by QDeclarativePolyLineMapItem, where support for the respective parameters, penStyle and penCap, is not implemented in the rendering code. None of the other map items support any such dynamic parameters, their support is not documented, and only used in the mappolyline manual test. So remove all that code. If we want to support more properties, then the QDeclarativeMapLineProperties type gives us that infrastructure already. Change-Id: Iddaac568a7dc09deb0bb5085b5b90c3cca0fa5ca Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove MapObjects from labsVolker Hilsheimer2022-09-2660-6742/+8
| | | | | | | | | | | | | | | The feature was designed to enable map backends to implement their own rendering of the map, and map items. It was never really used by any of the backends we supported, and introduced a lot of complexity to the code base. The idea as such has perhaps merit, but for now we focus on the basic functionality of Qt Location. Support for Qt Location when the Qt Quick scene graph is not used is not a part of that. Change-Id: I08e460043a0bd2600bad79b6ce2bb18e40e19eb6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Improve QEvent::UngrabMouse handling in map gesture areaLauri Laanmets2022-09-261-13/+3
| | | | | | | | | | | | | | | | | | Replace deprecated QQuickWindow::mouseGrabberItem() check and pass on all QEvent::UngrabMouse events into general 'QQuickGeoMapGestureArea::handleTouchEvent' handler. This will handle 'exclusiveGrabber' and 'QEventPoint::Released' events separately for all points. This will now correctly handle the situation where child MouseArea: 1. Grabs first touch point with 'press and hold' 2. Second finger is pressed. 3. First finger is released and 'ungrabbed'. 4. Second finger will start panning the map. Task-number: QTBUG-96795 Change-Id: Ieb3418787e89aadd1a7c0c8ab9b1f965a4484c24 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Manually update dependencies on 'dev' in qt/qtlocationVolker Hilsheimer2022-09-261-3/+3
| | | | | Change-Id: I6cc63b94fcf1a85981bab373f2d3e61277ffc988 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Reorganize code for map items into separate folderVolker Hilsheimer2022-09-2343-43/+43
| | | | | | | | | Splitting the code that only provides declarative wrappers around types from the implementations of the map and item rendering makes it easier to work with the code base and identify dependencies. Change-Id: I00064f928043dfa77f22e68b1efe54f414cb62f7 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Move the GeoJSON parser out of labsVolker Hilsheimer2022-09-233-1/+1
| | | | | | | | | It's used in the OSM plugin and has been built as part of the core library for a while. It's not public API, but there is a dedicated geojson viewer example demonstrating the functionality. Change-Id: I8f26906d9d1c601d481fec0d503af4dae34ada4d Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Clean up CMakeListsVolker Hilsheimer2022-09-231-85/+68
| | | | | | | Put header and implementation files together. Change-Id: Ie8644fbd16a5a8cbe21b9a534bed48524e60c943 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Remove duplicate type registrationVolker Hilsheimer2022-09-231-3/+0
| | | | | | | | QML types are registered through location.h, and there with the correct capitalization. Change-Id: I6dca39c0f28cfb6bcfcbc70eee7ddbca11638c57 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Rename Nokia HERE specific testVolker Hilsheimer2022-09-231-1/+1
| | | | | | | | Analog to tst_nokia_routing, call this test tst_nokia_places although there is also a tst_qplacemanager_nokia test that is not semi-automatic). Change-Id: I03ed29463b4877acfbd87953faaca1fd9b1cdfe7 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* GeoJSON: don't crash when operating on empty dataVolker Hilsheimer2022-09-222-1/+6
| | | | | | | | | Fix crashes in "geojson_viewer" example when trying to print or store debug data without loading a file first. Change-Id: I7b2955d072af8d2a1f39bfca196ffc309e9b4234 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Stabilize flaky testsVolker Hilsheimer2022-09-221-2/+1
| | | | | | | | When testing model resets, wait until it reports data using tryVerify instead of a hardcoded single milisecond. Change-Id: Id3f3464f54a2b05e25c602594357e767eb8bbdba Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix warning in manual testsVolker Hilsheimer2022-09-223-6/+6
| | | | | | | ... and fix usability for rotation testing. Nice to get back to 0 again! Change-Id: I9985721b0af993ff19d0808c29ac7ab617d3559a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Cleanup: Remove duplicate storage of values from declarative wrappersVolker Hilsheimer2022-09-224-61/+39
| | | | | | | | | | | | | | QPlace and QPlaceCategory already store the icon, ratings, supplier etc as values. The declarative wrappers have to emit signals when those change, but that can only happen when either the QPlaceCategory or QPlace itself changes, or when the individual sub-properties are changed through the setters of the declarative type. So we can remove the double-book-keeping and treat those value types like all other values (e.g. QPlace::name). Change-Id: I2703529ee625e23937b3d12ec57e60500f8e1e62 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Cleanup: Move PlaceCategoryNode into only class using itVolker Hilsheimer2022-09-221-8/+7
| | | | | Change-Id: I4815b70b6b514c668fb8316da1ffa01b1ca2a3b9 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove save/remove implementations from Nokia engineVolker Hilsheimer2022-09-227-198/+3
| | | | | | | | | | The default implementation returns the special "Unsupported" reply when saving/removing categories or places, and the Nokia implementation did essentially the same thing, setting the UnsupportedError through a queued connection. Change-Id: I5eca2d1efe19f603b0151fc74e2815aba1d9781b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Cleanup: QPlaceContent and subclasses (3/3)Volker Hilsheimer2022-09-2213-791/+224
| | | | | | | | | | | | Remove the dedicated declarative model implementations for the special QPlaceContent types. Since everyhing is now a QPlaceContent, the generic model can return all the data, depending on which QPlaceContent::Type it has been created for. For QML clients, nothing changes. Change-Id: I7c8c02dc5986f4223b8f112dc5766ce073a41a4d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Cleanup: QPlaceContent and subclasses (2/3)Volker Hilsheimer2022-09-2214-928/+6
| | | | | | | | Remove deprecated APIs entirely, and add them as gone to the changes documentation. Change-Id: If55339881142b0fddc3f045d8c5a0eca0490c727 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Cleanup: QPlaceContent and subclasses (1/3)Volker Hilsheimer2022-09-2226-1080/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlaceContent and subclasses are value types, and subclassing value is a bad idea, for many reasons. Great care had been taken to work around the slicing problem, resulting in lot of code and complexity. Instead of the slicing problem, we now have the problem that we can assign a QPlaceContent item to a QPlaceImage and back, but that same QPlaceContent object can also be assigned to a QPlaceReview and a QPlaceEditorial item. Those then end up as empty items. So while it seems convenient to have C++ types, we replaced compile errors or explicitly dynamic APIs, like QVariant, with implicit conversions that require explicit type checks before, with the risk of silently losing data. Ironcially, applications access those different values then through various QAbstractItemModel implementations - which return QVariants anyway, requiring explicit type checking and coertion. And the C++ convenience is exclusively interesting for backend implementors, who anyway need to parse data and identify types dynamically. What we really need is a map of QVariants, and some information about what kind of data we can get out of the map. So as a first step in cleaning, replace the data storage with such a map and remove all the subclass specific privates, together with all the complexity (virtual functions, QSharedDataPointer::clone template specializations, macros). The subclasses themselves become very thin API wrappers. Their only special feature is that they all can still be constructed from a QPlaceContent instance. We need this for compatibility. With all the convenience C++ APIs marked as deprecated, people can still use those when using Qt 6.2-compatible Qt Location, and use the warnings to prepare for Qt 6.5 where we can then remove those APIs entirely. Change-Id: Id75f55d784fbe214a0db93d3c1f786209ef0a690 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Cleanup: de-virtualize QGeoRoutePrivateVolker Hilsheimer2022-09-226-405/+81
| | | | | | | | | | | | | | | The possibility to override this type in plugins was used for metadata that might just as well live in the extended attributes. And the usecase of making the basic passing of data from a private through a public type does not justify the overhead, and can be solved by simply initializing the value in the test plugin through the public setter. So remove this; if this is really needed for anything, then we can bring it back later. Change-Id: Iad8689b54f64fa89535d0ebc3c399b4fd054f9d7 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Simplify declarative wrapper of QGeoRouteVolker Hilsheimer2022-09-225-62/+50
| | | | | | | | | | | | | | | | | | | | | Move the logic of counting, and assembling a list of segments into the QGeoRoute implementation, using a generic function that iterates the linked list of segments and calls a functor. Remove the (premature - how many legs are there - 5?) optimization of caching the list of legs and segments. For extended attributes, return the QVariantMap from QGeoRoute rather than building a declarative map (that is then supposed to be CONSTANT). Make the getters const. The only thing stopping QGeoRoute to be directly exposed to QML and the declarative wrapper to be removed is now the access to the routeQuery object. Change-Id: Ie9b86c3b235a75f3bbea086697a6eda02b060264 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Port place example from qtquick1 to qtquick2Santhosh Kumar2022-09-2124-183/+195
| | | | | | | | | Modified places (location/examples/location/place) example to use qtquick control 2 and its properties. Fixes: QTBUG-105827 Change-Id: I78ddd50655bc914fdc10002caed154ee5aa19bcf Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix mapviewer example issues and modernize codeVolker Hilsheimer2022-09-2011-131/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the example away from imperative coding style, and fix code that didn't following Qt 6 practices or caused warnings to be emitted to the console: Populate all menus consistently through items that bind their enabled state to relevant properties. This avoids that we have to clear and recreate the menus when switching provider. Don't print debug output when updating the position of the minimap. Capture parameters of signals correctly in the handlers. Fix some UI issues: We cannot replace the background of a styled button, so use AbstractButton instead, otherwise the example will generate runtime warnings with some styles, e.g. qrc:/qt-project.org/imports/QtQuick/Controls/macOS/Button.qml:44: TypeError: Property 'styleFont' of object QQuickRectangle(0x7fdfaa4e7bd0) is not a function Also don't squeeze the sliders by setting the spacing to -10, styled sliders will overlap, and don't use anchors on items managed by layouts. Change-Id: I118a52ae3d2ece77c662fd42bb868c9bbcf30e7a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>