summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QGeoPath: update the API to use qsizetype instead of intIvan Solovev2021-03-253-30/+30
| | | | | | | | [ChangeLog][QtPositioning][QGeoPath] Use qsizetype instead of int in public API Change-Id: I536873ceaa75c827a4e3e4caf17cfa574be9dc8b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: more documentation fixesIvan Solovev2021-03-2510-65/+75
| | | | | | | | | | This patch fixes some typos, linking issues and improves wording in some places. Task-number: QTBUG-89856 Change-Id: Ia77290aa94a1b786f633be75b907b9a6afb71698 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Allow removal of layers and sources created using parameters in MapboxGLTadej Novak2021-03-253-0/+35
| | | | | | | | [ChangeLog][MapboxGL] Sources and layers from parameters can be removed Task-number: QTBUG-91623 Change-Id: I08db3e02b123f3ffb16e09fb77070ad5b6dbb18a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix compilation for no opengl buildsMichal Klocek2021-03-2512-21/+109
| | | | | | | | | | | | | Disables experimental labs qml plugin, which since a4469cad40 depends heavily on opengl backend. Fix warnings with msvc when compiling without experimental plugin. Task-number: QTBUG-91623 Fixes: QTBUG-88017 Change-Id: I53c5da915981bd05f39134ba57f585d0a0786aa8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge branch '5.15' into devIvan Solovev2021-03-239-15/+36
|\ | | | | | | | | Task-number: QTBUG-91623 Change-Id: I3218a516d4ecb0030a14c692c7d3d94d5833c3fa
| * Simpler fix to crashing Qml Map appearing 2nd+ timePiotr Mikolajczyk2020-11-092-32/+11
| | | | | | | | | | | | | | | | | | | | | | Previous solution did not take advantage of the QSGNode::OwnedByParent flag. Setting this flag to false allows to use parent() property to determine if the node has been removed from node tree. This amends 4fe9e0ed027134a833b2243597a2ccd00987b559 Fixes: QTBUG-85260 Change-Id: I705848483d7dc2639dffffa0ff66c682b3fffca0 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
| * Android: fix Location propertiesVyacheslav Koscheev2020-11-031-5/+20
| | | | | | | | | | | | | | | | | | | | | | According to android doc getAltitude, getAccuracy, getVerticalAccuracyMeters, getSpeed, getBearing & getAltitude returns 0.0 if location does not have this value. Corresponding has* method can return false positive on some devices. e.g. Huawei P20 Pro Change-Id: I887412cf2cff05414de08c774947d969fc69aa92 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Fix crash when showing Map QML comp. for 2nd+ timePiotr Mikolajczyk2020-10-281-1/+28
| | | | | | | | | | | | | | | | Crash caused by storing pointer to a node that could be deleted elsewhere Fixes: QTBUG-85260 Change-Id: I871123322fac84b8bf91e9bab8ecad08e75c2854 Reviewed-by: Paolo Angelelli <paolo.angelelli.qt@gmail.com>
| * Make names of poly2tri, clipper, clip2tri libraries uniqueKai Koehne2020-10-026-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids conflicts for static builds, where the system might also provide a clipper2tri, clipper, or poly2tri library. [ChangeLog][General] The generated clipper2tri, clipper, poly2tri libraries have been renamed to qt_clipper2tri, qt_clipper, qt_poly2tri. This avoids conflicts for static builds. Fixes: QTBUG-86248 Change-Id: I38261633acef1d3be0cb5b67b3b5bf3262258a95 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 6b2cf7e9d150b7be709fcd688c5045949cedc3d9) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Use RedirectPolicyAttribute instead of FollowRedirectsAttributeMårten Nordheim2020-09-152-2/+2
| | | | | | | | | | | | | | Because we want to deprecate FollowRedirectsAttribute Change-Id: I3453b120a442dea3624ff2a3f49a2eb565bde762 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * Update src/3rdparty/mapbox-gl-nativeKai Koehne2020-09-071-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Take in commits d3101bbc2 Update Qt redirection handling 5dbbb966f [qt] Remove libc++ attribution 9d155e652 [qt] Document deps/optional dependency 255935c14 [qt] Add zlib to mapbox-gl license a7f15a826 [qt] Improve third-party license documenation [ChangeLog][Third-Party Code] Update and extend third-party documentation for Mapbox GL plugin dependencies: libc++, Optional, Mapbox GL Native, Boost, CSS Color Parser, cURL Parse Date, Earcut Polygon Triangulation Library, geojson-cpp, geojson-vt-cpp, geometry.hpp, kdbush.hpp, polylabel, protozero, RapidJSON, shelf-pack-cpp, supercluster.hpp, tao_tuple, unique_resource, variant, Vector Tile Library, Wagyu Geometry Processing Library, nunicode. Change-Id: Icb55f9aaa2d96dd973aced90a73208eb8c0be209 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> (cherry picked from commit 7769ea903f87efc4ad55530a2749f104eddff2e4) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Add actual text of Boost Software LicenseKai Koehne2020-08-261-0/+27
| | | | | | | | | | | | | | | | | | | | [ChangeLog][Third-Party Code] Added actual license text of Boost Software License (used in Clipper Polygon Clipping Library) Change-Id: Ie4bfc92541eaac3844a8a75044e2ba60a89adaaa Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit e69a08a91334df9830d196c48b24f487775e798f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Purge uses of legacy cruft before qtbase removes itEdward Welbourne2020-07-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | A use of deprecated qrand() was in a comment, so remove it. A use of QT_BEGIN_HEADER wasn't matched by QT_END_HEADER and it's now a no-op anyway. Change-Id: Ie79c181e5f194c00949bfd7d2372f2d246b53180 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 354d59cd8e7972525e5978d970ef5e64edb14898) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
| * Fix incorrect iteration over a C arrayThiago Macieira2020-05-201-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found by Clang 10: error: expression does not compute the number of elements in this array; element type is 'const MapStyleData', not 'QGeoMapType::MapStyle' [- Werror,-Wsizeof-array-div] Instead, just use range-for. Task-number: QTBUG-83666 Change-Id: I99ab0f318b1c43b89888fffd160b589c5543b9d4 Coverity-Id: 226105 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 275efcc6c493e01fcbb623de4a277cffd584fa58)
| * Fix Clang 10 warnings about deprecated copy constructorsThiago Macieira2020-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | qgeocodereplyosm.cpp:115:21: error: loop variable 'k' of type 'const QString' creates a copy from type 'const QString' [-Werror,-Wrange-loop- construct] Task-number: QTBUG-83666 Change-Id: I99ab0f318b1c43b89888fffd160b4a12bee11723 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 8b0c9024b1eb9b6a4ad2e440d6e7856ca3a09e80) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Fix warning about QString::SkipEmptyParts being deprecatedThiago Macieira2020-05-203-3/+3
| | | | | | | | | | | | | | | | | | /home/tjmaciei/src/qt/qt5/qtlocation/src/plugins/geoservices/mapbox/qplacesearchreplymapbox.cpp:107:98: warning: ‘QString::SkipEmptyParts’ is deprecated [-Wdeprecated-declarations] Change-Id: Ib3333a58f37746f3b935fffd1607e152af50f386 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 3ca1149275e1e63e11c8d97f696e05bf73d2e076) Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
| * Merge remote-tracking branch 'origin/5.15.0' into 5.15Tony Sarajärvi2020-05-112-1/+1
| |\ | | | | | | | | | Change-Id: Ied8bd656df6a6ad2c3d913905b32f8e08fd9d7e0
| | * Update mapbox-gl to the latestv5.15.0-rc2v5.15.05.15.0Thiago Macieira2020-05-061-0/+0
| | | | | | | | | | | | | | | | | | | | | Needed to compile with GCC 9 and 10. Change-Id: I99ab0f318b1c43b89888fffd160bf42e51e9a0d1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * Fix typo in error->errorOccurred deprecation fixMårten Nordheim2020-04-201-1/+1
| | | | | | | | | | | | | | | Change-Id: If9ee065e8d2cbca6ca0ff64415c509caa655a2e6 Reviewed-by: Paolo Angelelli <paolo.angelelli.qt@gmail.com>
| * | Fix Qt6 buildAlexandru Croitor2020-05-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iab6e89c016eb25ea99edcdc88e1191604157b4b9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 22895ccf70a5f0932972f5b363fd9001e19616bd) Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Fix developer-build with clang 7Robert Loehning2020-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | comparison of two values with different enumeration types in switch statement ('QVariant::Type' and 'QMetaType::Type') Change-Id: I40bff89a773d4c312825133fd8c00e32e469953a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Remove unused variableRobert Loehning2020-04-281-2/+0
| | | | | | | | | | | | | | | | | | | | | Fixes developer build with clang 7. Change-Id: I45e532541de0f3acc6cdd00231ed7d3aa2264e48 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Add missing "override"Robert Loehning2020-04-281-1/+1
| |/ | | | | | | | | | | | | | | Fixes developer build with clang 7. Change-Id: I551a5b90d02f5ccb9a7e2e0f9e455d593237a562 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli.qt@gmail.com>
* | QtPositioning: add a link to CPP-QML interaction article to main pageIvan Solovev2021-03-231-0/+1
| | | | | | | | | | | | | | Task-number: QTBUG-89856 Change-Id: If1fb4ba48c81575303681cda3eff7959d75fcaff Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: omit documentation links to QtLocationIvan Solovev2021-03-231-16/+26
| | | | | | | | | | | | | | | | | | | | This patch omits the references to QtLocation documentation and, where possible, replaces it with QtPositioning examples. Task-number: QTBUG-89856 Change-Id: I9b24c9c41eabd8b2ad1e5b8a617f01b999782c88 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: improve documentation on C++ - QML interactionIvan Solovev2021-03-231-40/+58
| | | | | | | | | | | | | | | | | | | | Update the documentation to mention the actual type registration. Fix some links and align the docs to 80 characters. Task-number: QTBUG-89856 Change-Id: I6cde9ad456b975b1828f8035d16515253dde69b5 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | QtPositioning: update main docs pageIvan Solovev2021-03-234-43/+52
| | | | | | | | | | | | | | | | | | | | | | Improve Positioning documentation main page to reflect different build systems. Get rid of UWP mentions, as the corresponding docs page is removed. Update documentation dependencies. Task-number: QTBUG-89856 Change-Id: I70a9aecf1b60d7cff8b504f17fd1c9ffb4ff1e90 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | QtPositioning: update QML docs landing pageIvan Solovev2021-03-231-18/+11
| | | | | | | | | | | | | | | | | | | | Remove the outdated PositionSource::nmeaSource and reword the PositionSource section. Task-number: QTBUG-89856 Change-Id: I0af1c011b6cb12dcfa5ec3006248461e83c39167 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: fix QDoc warningsIvan Solovev2021-03-236-27/+27
| | | | | | | | | | | | | | | | Fix some QDoc warnings and update some code samples Task-number: QTBUG-89856 Change-Id: I12ac2f3ac58d2701e1458d7d28f9c1c19fb1244a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: fix branch condition evaluationIvan Solovev2021-03-231-1/+3
| | | | | | | | | | | | | | | | This bug was detected by codechecker. The uninitialized variable could be still left uninitialized in case coordinate parsing fails. Change-Id: I0a849d4409091b555e2b9639f570fffd4efc952d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: update QML pluginIvan Solovev2021-03-225-324/+2
| | | | | | | | | | | | | | | | | | | | | | | | - Remove duplicated plugins.qmltypes, plugin.json and qmldir files. These files are now generated by PositioningQuick library. After some updates in the build system, these duplicated files actually break the build. - Make the plugin optional, so that its loading can be skipped by linking to the underlying library. Change-Id: I29e78c79781211aa8b6f2c449ddc260e7ad8593b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QtPositioning: remove Geoclue pluginIvan Solovev2021-03-1723-1882/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove geoclue plugin, as the library is no longer supported, and it's not a part of morden linux distributions. The docs are also updated to exclude all the geoclue mentions. [ChangeLog][QtPositioning] Remove geoclue plugin. Use Geoclue2, Gypsy or NMEA instead. Task-number: QTBUG-91528 Change-Id: Ib1f8998aa42755daebe91cdf5457d76232af51f8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | PositionSource: set preferred positioning methods to All by defaultIvan Solovev2021-03-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preferred positioning methods in PositionSource are set to NoPositioningMethods by default, which does not make much sense for me, because it technically forbids receiving positioning data. Normally this does not affect the applications, because the logic for settings preferred methods handles NoPositioningMethods specially. However on Android, if the application with PositionSource is launched for the first time (and so needs to request permissions), the permissions are not properly set, and so the positioning data is not received. Application restart is required. This patch sets default preferred positioning methods to AllPositioningMethods, allowing android applications to work correctly. Task-number: QTBUG-91528 Change-Id: I65b793e840dad3dd4f8acb1f3ce1a9267581489b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: remove duplicated signals from GYPSY pluginIvan Solovev2021-03-101-4/+0
| | | | | | | | | | | | | | | | | | | | | | The signal definition in plugin shadows the signals from the base class. This results in incorrect behavior while connecting to signals of the base class (without explicit casting to QGeoSatelliteInfoSourceGypsy). Task-number: QTBUG-91528 Change-Id: I74d045de469eeb13377f934ad9c473ba4c8374e0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: increase control object lifetime in GYPSY pluginIvan Solovev2021-03-022-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | For some reason the GObject control object was destroyed as soon as the device was created. With the current version of glib it results in immediate destruction of all the created objects, so the newly created device got destroyed as well. As a result, the plugin was unusable. This patch extends the lifetime of the main control object for the lifetime of the whole plugin. Change-Id: I2ff2d40dea33b89c70f1f1188569f06fed4c88d9 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | NMEA: distinguish between different satellite systemsIvan Solovev2021-03-027-100/+382
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While working with device that supports multiple satellite systems, we can receive GSV and GSA messages from different satellite system types. Previously we did not distinguish the types, so our code was not able to collect the full information. For example: 1. We receive $GPGSV (GPS) and save them to the list of satellites in view. 2. We receive $GLGSV (GLONASS) - we overwrite the list instead of extending it. And the situation was even more complicated with $GNGSA (satellites in use from multiple systems) messages. This patch tries to fix all these issues and introduce a proper satellite system type handling. Fixes: QTBUG-91074 Change-Id: I3fa03710c4318ebc2c10da1b676f7631751cabdb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: bump versionIvan Solovev2021-02-262-2/+2
| | | | | | | | | | | | | | | | | | | | Bump the module version to 6.2. This also includes updating the minimum revision for new QML properties (they have to be 6.2, not 6.0 or 6.1, as QtPositioning is part of 6.2 release only). Task-number: QTBUG-90864 Change-Id: I1b00882c25f6751a1bdc2e64a42117150879381e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: add virtual destructor to QGeoShapeIvan Solovev2021-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | QGeoShape is a base class for multiple shape classes like QGeoCircle, QGeoRectangle, etc... It must have a virtual d-tor. Task-number: QTBUG-90491 Change-Id: I0764cea2011fac3a05ffc0e25f9ace32c625effb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QNmeaSatelliteInfoSource: add support for TCP socket and fileIvan Solovev2021-02-237-122/+606
| | | | | | | | | | | | | | | | | | | | Refactor QNmeaSatelliteInfoSource to support both simulation and realtime modes. Extend NMEA plugin docs. Task-number: QTBUG-90491 Change-Id: Ie7298eb864ed2c8eab3a9b5e4b003f21a7a0cbf2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: add docs for Qt 5 -> Qt 6 API changesIvan Solovev2021-02-231-0/+233
| | | | | | | | | | | | Task-number: QTBUG-90491 Change-Id: I38789d468940454fb73afdcbd4d6e9c2558e657d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: get rid of unneeded private exportsIvan Solovev2021-02-1511-39/+24
| | | | | | | | | | | | | | | | | | | | | | | | In this patch we try to get rid of Q_POSITIONING_PRIVATE_EXPORT exports that are not really used outside of QtPositioning library, and so should not be exported. We also revisited the CMakeLists.txt files to remove unneeded private dependencies. Task-number: QTBUG-90491 Change-Id: Ia46579d340c3d1b088dd76ce5a1aacbef34358ad Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QGeoAddress: add street numberIvan Solovev2021-02-125-55/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtPositioning][QGeoAddress] Introduce QGeoAddress::streetNumber and QDeclarativeGeoAddress::streetNumber to hold the actual street number as well as other important information that might be used to distinguish one address from another. QGeoAddress::street and QDeclarativeGeoAddress::street now hold only street name. Task-number: QTBUG-90491 Change-Id: Iec18d99fbc61aee72f11d6b44df909ae5bd5da35 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QDeclarativePositionSource: remove nmeaSourceIvan Solovev2021-02-122-196/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The features (nmea file and tcp socket reading) are now supported in NMEA plugin. [ChangeLog][QtPositioning][QDeclarativePositionSource] Removed QDeclarativePositionSource::nmeaSource property. Also removed SourceError::SocketError error. The features of reading nmea stream from file and tcp socket are now supported in QtPositioning NMEA plugin. Task-number: QTBUG-90491 Change-Id: I722a06bf7ace750fe767aa09157ece3c93d0393c Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: improve NMEA pluginIvan Solovev2021-02-1214-368/+585
| | | | | | | | | | | | | | | | | | | | | | | | | | - Rename serialnmea to nmea - Add support for QTcpSocket - Add support for reading data from QFile [ChangeLog][QtPositioning] SerialNmea plugin is renamed to Nmea. It's now capable of working with QTcpSocket and QFile. Task-number: QTBUG-90491 Change-Id: I9f591785c27157d7decf4e61aa6edfbeaffcd6f0 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: move QNmeaSatelliteInfoSource to the libraryIvan Solovev2021-02-1210-232/+352
| | | | | | | | | | | | | | | | | | | | - Move files from plugin to the library. - Add virtual methods, so that NMEA parsing can be overridden. - Add and update unit tests Task-number: QTBUG-90491 Change-Id: Ia2deb27c97c1552cd96832a47fe944bdc7638a07 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: refactor QGeoAreaMonitorInfoIvan Solovev2021-02-102-3/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following changes were implemented for the class: - Use QExplicitlySharedDataPointer for private d-ptr instead of QSharedDataPointer, so that we can have more control over the sharing behavior. - Implement move-constructor and move-assignment operator. The moved-from object is left in partially-formed state. Such behavior is documented. - Use Q_DECLARE_SHARED to declare the typeinfo as Q_RELOCATABLE_TYPE and provide a free swap() overload. - Provide a qHash() overload. - Provide a QTest::toString() overload. Task-number: QTBUG-90491 Change-Id: I8d89dff15d92e6643cf405700db73dc636d38b77 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QtPositioning: update QGeoLocation to use QGeoShapeIvan Solovev2021-02-095-31/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QGeoLocation and QDeclarativeGeoLocation now use QGeoShape for bounding shape. The boundingBox() and setBoundingBox() methods are renamed to boundingShape() and setBoundingshape() respectively. Added tests for declarative geolocation. [ChangeLog][QtPositioning][QGeoLocation][QDeclarativeGeoLocation] Replaced QGeoLocation::boundingBox(), QGeoLocation::setBoundingBox(), QDeclarativeGeoLocation::boundingBox() and QDeclarativeGeoLocation::setBoundingBox() with QGeoLocation::boundingShape(), QGeoLocation::setBoundingShape(), QDeclarativeGeoLocation::boundingShape() and QDeclarativeGeoLocation::setBoundingShape() respectively. New methods use QGeoShape instead of QGeoRectangle. QML Location::boundingBox property is also replaced with Location::boundingShape. Task-number: QTBUG-90491 Change-Id: Ic609fde5de402fa6fea707baf18e5bd4e451aaa0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QtPositioning: refactor QGeoSatelliteInfoIvan Solovev2021-02-095-27/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following changes were implemented for the class: - Use QExplicitlySharedDataPointer for private d-ptr. - Implement move-constructor and move-assignment operator. The moved-from object is left in partially-formed state. Such behavior is documented. - Use Q_DECLARE_SHARED to declare the typeinfo as Q_RELOCATABLE_TYPE and provide a free swap() overload. - Provide a qHash() overload. - Provide a QTest::toString() overload. All these changes are common pattern for Qt value classes. The benchmark shows that it results in slight performance drop while constructing a brand new object (most probably because of the overhead of QSharedData and QExplicitlySharedDataPointer), but also gives a comparable performance boost for copy constructor and copy assignment. And of course a significant performance boost on move-operations (which were just copy-operations previously). Other API calls didn't have any significant performance impact. Task-number: QTBUG-90491 Change-Id: I51ed7041c4b9ecd763f045abbb80df5e0dcde8f6 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QtPositioning: refactor QGeoPositionInfoIvan Solovev2021-02-094-27/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following changes were implemented for the class: - Use QExplicitlySharedDataPointer for private d-ptr. - Implement move-constructor and move-assignment operator. The moved-from object is left in partially-formed state. Such behavior is documented. - Use Q_DECLARE_SHARED to declare the typeinfo as Q_RELOCATABLE_TYPE and provide a free swap() overload. - Provide a qHash() overload. - Provide a QTest::toString() overload. All these changes are common pattern for Qt value classes. The benchmark shows that it results in slight performance drop while constructing a brand new object (most probably because of the overhead of QSharedData and QExplicitlySharedDataPointer), but also gives a comparable performance boost for copy constructor and copy assignment. And of course a significant performance boost on move-operations (which were just copy-operations previously). Other API calls didn't have any significant performance impact. Task-number: QTBUG-90491 Change-Id: I3db93e89e3bc73d0322857401c1c1dd2bd469c27 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* | QtPositioning: refactor unit testsIvan Solovev2021-02-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the QtPositioning QML unit tests can be separated from the QtLocation tests, and run with QtPositioning and QtPositioningQuick only. This patch moves such unit tests into separate subdirectory. It also updated the tests to reflect the changes in Qt6: Since Qt6 the variant type behaves as var, so the tests that rely on the obsolete behavior need to be updated. The QGeoShape::center() method is no longer marked Q_INVOKABLE, because with updated Qt6 behavior it overrides the center properties of the child classes (like QGeoCircle or QGeoRectangle). It's marked as a read-only property instread, so that it could still be accessed from QML code. [ChangeLog][QtPositioning][QGeoShape] center is now a read-only property. The center() function is no longer a Q_INVOKABLE. Task-number: QTBUG-90491 Task-number: QTBUG-90836 Change-Id: I3c7993aa8abe1199e825d46ab19ccfb53902018f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>