summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeomaneuver.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersVolker Hilsheimer2023-02-021-38/+2
| | | | | | | Task-number: QTBUG-67283 Pick-to: 6.5 Change-Id: I4b8f877cc355c7c6cd410b3b1683defa58486381 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Cleanup: de-virtualize QGeoManeuverPrivateVolker Hilsheimer2022-09-191-127/+20
| | | | | | | | | | | | | The possibility to override this type in plugins is not used anywhere, and overcomplicates the code. There isn't even a way to create a QGeoManeuver with a reimplementation of the private. So remove this; if this is really needed for anything, then we can bring it back later. Change-Id: I4edf78a21f53593e609f6e86e04464d4e974b0df Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
* Remove QDeclarativeGeoRouteSegment wrapperVolker Hilsheimer2022-09-091-2/+2
| | | | | | | | | | | | | | | | | | | Register the QGeoRouteSegment gadget type directly as the routeSegment QML type (via a Foreign), and use it in QDeclarativeGeoRoute. The type is now uncreatable. It wasn't in 5.15, but since there is no setter-API that is exposed to QML, there is no reason to have it be a creatable type. Adjust the QML test to declare a property of type routeSegment instead. Move the QML type documentation into QGeoRouteSegment, and document the corresponding C++ properties via \property. Unify the language a bit, and follow up on the rename from RouteSegment to routeSegment. Pick-to: 6.2 Change-Id: I1ebae0c1a9d056aa59510a3ab539b1d8bce8c6c7 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Register QGeoManeuver declarativelyVolker Hilsheimer2022-09-081-14/+14
| | | | | | | | | | | Amend da10ee9b67aaf0c9218c2b891efa06b323866470 to register QGeoManeuver also via Foreign types (both as a value type and a namespace), using declarative type registration and generated plugin sources. Rename the QML type to routeManeuver to follow naming convention. Pick-to: 6.2 Change-Id: I98257c0ef4389e4de225c933425740a82161d5df Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Remove QDeclarativeGeoManeuverVolker Hilsheimer2022-09-011-44/+132
| | | | | | | | | | | | | | | | | | | | | | Register the QGeoManeuver type directly as the RouteManeuver QML type, and use it in QDeclarativeGeoRouteSegment. The type is now uncreatable. It wasn't in Qt 5.15, but since there is no setter-API that is exposed to QML (QDeclarativeGeoRouteSegment::maneuver is a read-only property tagged as CONSTANT), there is no point in creating a RouteManeuver object in QML anyway. The QML tests can get a default-created QGeoManeuever from an empty route segment. Document the C++ properties via \property, move the QML type documentation into the qgeomaneuver.cpp file, and unify the language. Note: The QML type should be routeManeuver, as value types should start with a lower-case character. If we make that change, it will be in a separate, compatibility-breaking commit for all the value types. Pick-to: 6.2 Change-Id: I277e7011f2082e2da9e0141db9bad0a60a524c88 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Gadgetize Map Value typesVolker Hilsheimer2022-08-301-0/+2
| | | | | | | | | | | | This might allow us to remove the respective declarative wrapper classes. However, QDeclarativeGeoRoute also provides access to a list of segments, the path (as a QJSValue), and the routeQuery, which are all not stored as part of QGeoRoute. Pick-to: 6.2 Change-Id: I65a25597f7d5540fb3edf837b48de160b5dde419 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Cleanup private map typesVolker Hilsheimer2022-08-191-39/+4
| | | | | | | | | | | | | | Use member initialization and remove any explicit implementation of the special member functions if they are just the default. Remove some unnecessary Q_DISABLE_COPY that prevents compiler-generated versions of the special member functions. Task-number: QTBUG-105206 Pick-to: 6.2 Change-Id: I206abd07acbbcb863a4d8099a5d8b7ff1f641079 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Clean up mix of polymorph and value semanticsVolker Hilsheimer2022-08-031-3/+0
| | | | | | | | | | | | | | | | | | QGeoManeuver had a protected constructor only to allow the test to replace the private implementation, which is polymorph. There is no use of this possibility to override the implementation of the class outside the test. If we want to bring this back, then a factory that the service provider plugins implement and through which the framework creates the implementations would be the typical architecture, without forcing the subclassing of value types with the risk for slicing or memory leaks when destructors are not virtual. Pick-to: 6.2 Task-number: QTBUG-105206 Change-Id: I3358da3939c43dfb83c4b2b10a792044590263f7 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Use 'const' correctlyVolker Hilsheimer2022-07-281-2/+2
| | | | | | | | | | Don't return or pass const copies, use either plain copies or const references. Make getters const, make variables const, and use qAsConst in ranged for loops to avoid detaches. Pick-to: 6.2 Change-Id: If1463cf7f0077c08dedb15388d912b652c2b037c Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Clean up includesVolker Hilsheimer2022-07-281-0/+1
| | | | | | | | | | Get rid of unnecessary includes in most public, and some private headers. Forward declare what we have to, and include headers where needed in the implementation and test files. Pick-to: 6.2 Change-Id: I7924e865b9d4ad9f8c8670605b59d5530346106e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Modernize Maps value typesVolker Hilsheimer2022-07-271-12/+14
| | | | | | | | | | | Add move semantics, turn comparison operators into hidden friends, add noexcept. Remove empty special member functions, or set them to default where they need to be provided. Pick-to: 6.2 Task-number: QTBUG-105206 Change-Id: I7601f6ed5aeeceb13a15094d3fb0620a2f623817 Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Use up-to date LGPL license headerKai Köhne2021-12-021-11/+14
| | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. Change-Id: Ied647fc10d2bf051cccc8b38d75570b7caef1f28 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Unify semicolon usage in Q_UNUSEDJesus Fernandez2019-01-231-9/+9
| | | | | Change-Id: I36dd6881b6f6f028869d63b6311cba7f52a99cc4 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Doc: Fix all documentation warningsTopi Reinio2018-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | Fix multiple warnings caused by invalid documentation configuration, missing QML module specifiers, wrong QML type names, incorrect arguments for the \fn command, and missing documentation. Remove incorrect statement from the example usage of the Waypoint QML type. Use 'QtLocation' as the name for the module throughout the docs. Clang (used as the parser for QDoc in Qt 5.11) was unable to resolve the path for qlocation.h, causing QDoc to omit the QLocation namespace documentation. Fix this by including the file explicitly from qlocationglobal.h for documentation builds. Change-Id: I2bd790db1ff5ad96f0cdb415a682b97593b3a6dc Reviewed-by: Martin Smith <martin.smith@qt.io>
* Merge remote-tracking branch 'origin/dev' into wip/navigationPaolo Angelelli2018-01-111-0/+40
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/location/maps/qgeomaneuver.cpp src/location/maps/qgeomaneuver.h src/location/maps/qgeomaneuver_p.h tests/auto/declarative_core/tst_routing.qml Change-Id: Iedf10d678a9129797f9aae872e09f78ef0a32de1
| * Add extended attributes to QGeoManeuver/QDeclarativeGeoManeuverPaolo Angelelli2017-11-291-0/+21
| | | | | | | | | | Change-Id: I6ed1d869d0a97e397057e92cf17ce9fddb4eca3f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix enabling polymorphic pimpl in QGeoRoute/Segment/ManeuverPaolo Angelelli2017-10-191-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 8ac6377e62af803b567449cdf30c669b92114cc4 allowed to subclass private implementations of these 3 classes. However, the pimpl was kept in a QExplicitlySharedDataPointer for the first two, and QSharedDataPointer for the last class. Failing to specialize the clone method of the pointer would result in incorrect detach behavior, which would however only be visible with the third class (the first two never call detach() internally, and the line QEXPECT_FAIL("", "QGeoRoute equality operators broken", Continue); in the tests make it clear. This change also adds the equals virtual method also to QGeoRouteSegment and QGeoManeuver private implementations. Change-Id: If51dafebb19e4cb2d1bcf40c2b6f136f804198e0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Make QGeoRoute extensiblePaolo Angelelli2017-08-241-44/+236
|/ | | | | | | | | | | | | | This change makes it possible to subclass QGeoRoute, QGeoRouteSegment or QGeoRouteManeuver, with custom private implementations. It also attempts to minimize the cost that creating a QDeclarativeGeoRoute currently has, by deferring the initialization of QDeclarativeGeoRoute::segments_ to the first access, and also populating the list only to the requested point. Change-Id: I4c87391bcc380ddca6523c748ebb97d2a44ed9d2 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Bump all QtLocation 5.5 tags to 5.6Alex Blasche2015-09-231-1/+1
| | | | | | | | | | | | | | | 5.5 was a tech preview release. The real release is 5.6. Some 5.5 interfaces did change. It is possible that there are apps in existence which are based on the 5.5 API's. To avoid miscommunication we bump all version tags to the real first release version. The existing 5.5 QML imports will continue to work but apps may encounter API changes when they move from 5.5 to 5.6. The API changes are listed in the QtLocation documentation. Change-Id: Ia7000e871a5ee6b09234e5d58d4fc8927e93b154 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix QtLocation \since tags in QML and C++Alex Blasche2015-05-291-1/+1
| | | | | | | | The first release is 5.5 and not 5.0 Change-Id: Ib659adf77293e10e8f3d117ce16bbc25858d6ab2 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove LGPLv2.1 and add GPLv2+ from/to QtLocationAlex Blasche2015-02-191-14/+17
| | | | | | Change-Id: I3007aa04d3dbc0e00cb0a43987d64d01ddf91edd Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Update contact URL in all license headers to qt.ioAlex Blasche2015-02-181-1/+1
| | | | | Change-Id: Ia1e333be7fec8898de609d9b9303b1ad7687632e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Iedee2507ab1bd46788409a98505d7be510253110 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Update copyright year to 2013Sergio Ahumada2013-06-131-1/+1
| | | | | Change-Id: I5b0cb7d56997ad7b91c073b3e02b31d0368fdcfa Reviewed-by: Alex <alexander.blasche@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ic1390da64a219642fa1e1482a7677a4c2db15cbc Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Coding style fixes: whitespace around pointers/referencesAlex Wilson2012-05-151-1/+1
| | | | | | Change-Id: Ie527591e2d9a1578137136fb6664e86c43eed1bf Reviewed-by: Thomas Lowe <thomas.lowe@nokia.com> Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Coding style fixes, round #1Alex Wilson2012-05-151-0/+3
| | | | | | | | | | | In this patch: * Assignment operators that don't check for self-assignment * Using const references where possible in function arguments * Using const refs in the iterator var of a foreach() loop * Add 'explicit' to constructors taking one parameter Change-Id: I640fd85c3312851f0d8c10193333efec41232e05 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* General documentation issuesWolfgang Beck2012-03-291-1/+1
| | | | | Change-Id: I021ab70e1cbb973817aecbf53b7af0760c5e36c4 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I00c66363046e475e6924aafd221483c7fad5c0d9 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I3850177e14291901e924f9c27ba09e75df00f96a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-061-1/+1
| | | | | Change-Id: I496795d13a615be8d252ca20a40dd2c5ba84ed60 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Location docs spelling/typo fixes.Peter Yard2011-12-141-3/+3
| | | | | Change-Id: I542b3e494b39a65952e8cb412f45cfec2f8567f0 Reviewed-by: Alex <alex.blasche@nokia.com>
* Update structure of QtLocation documentation.Aaron McCarthy2011-10-251-4/+4
| | | | | | | | | Separate out into sections for C++ and QML. Mark all classes as "since QtLocation 5.0" as there has been many API changes since Qt Mobility. Change-Id: Ie71c5f7cb8341e76d41b9fefce4781979f3e898c Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* QGeoManeuver should use implicit shared data copyingalex2011-10-041-1/+0
| | | | | | | | | This commit also adds the relevant unit test for QGeoManeuver. Change-Id: I4a55119f9aedea3d8e7a816225feae809d792ed7 Reviewed-on: http://codereview.qt-project.org/5949 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alex <alex.blasche@nokia.com>
* Fix missing/outdated license headers.Aaron McCarthy2011-09-261-2/+2
| | | | | | | Change-Id: I9dbdf6f4974167a2a4229bd3bd798f7de36bfc10 Reviewed-on: http://codereview.qt-project.org/4939 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* make QtLocation work while Qt is compiled with namespaceAlex2011-06-211-2/+2
| | | | Task-number: QTBUG-19972
* Update licenseheader text in source files for qtlocation Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* first commit of QtLocationAlex2011-05-061-0/+321