summaryrefslogtreecommitdiff
path: root/src/location/declarativeplaces
Commit message (Collapse)AuthorAgeFilesLines
* Merge 5.15 to dev and fix resulting compile issuesQt Forward Merge Bot2020-04-022-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/location/location.cpp The change fixes the bare minimum of what needs to be done to compile and run. This includes the following issues: 1. Fix build failures as a result of QMetaType changes in qtbase moc now stores the QMetaType of properties as a result of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 in qtbase, which requires full type information about the property type inside the moc generated source file. Many of the property types were forward-declared, and this resulted in build errors like: "invalid application of 'sizeof' to an incomplete type 'QDeclarativeGeoMap'" 2. Adopts QtQML API changes. A private QJSValue ctor was removed. The "replacement" is QJSValuePrivate::fromReturnedValue(..). 3. The mapboxgl 3rdparty backend does not compile at this point in time and seems unmaintained. For the time being, the mapboxgl backend is disabled in the interest of keeping qtlocation closer to dev HEAD of other Qt modules. Change-Id: I756e1c2effb29eaaf96a61a28c1c17338774b77c
* Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-08-032-23/+13
| | | | | | | | | | | | | | | ... 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>
* 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>
* Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-032-3/+3
|\ | | | | | | Change-Id: I46ebc392ac3f5da89bc9957113247dd18d682fc1
| * Doc: Fix documentation issuesTopi Reinio2019-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | Fix various documentation-related issues, including missing parameter documentation, broken links, and typos. Do some minor language editing. Change-Id: I0a8f8457e0d1ab56b4fc4670376509adf1fd26a3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
| * Compile fixJarek Kobus2019-05-131-1/+1
| | | | | | | | | | | | | | | | | | | | It fixes the following issue: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Werror=sign-compare] 115 | else if (searchArea.type() == qMetaTypeId<QObject *>()) { Change-Id: I67e4abd664c19bf3560023d9bd58127a6c97aa58 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Fix deprecation warningsFriedemann Kleint2019-05-271-1/+1
|/ | | | | | | | | | | | | | | | | | | Fix warnings: maps/qgeotilefetcher.cpp:78:36: warning: 'QList<T> QSet<T>::toList() const [with T = QGeoTileSpec]' is deprecated: Use values() instead. [-Wdeprecated-declarations] declarativeplaces/qdeclarativeplace.cpp:1088:101: warning: 'QVariant qVariantFromValue(const T&) [with T = QDeclarativePlaceAttribute*]' is deprecated: Use QVariant::fromValue() instead. [-Wdeprecated-declarations] maps/qgeotiledmapscene.cpp:498:62: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] maps/qgeotiledmapscene.cpp:498:89: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] maps/qgeotiledmapscene.cpp:643:61: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] maps/qgeotiledmapscene.cpp:643:94: warning: 'static QSet<T> QSet<T>::fromList(const QList<T>&) [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] /data1/frkleint/qt-dev/qtbase/include/QtCore/../../src/corelib/tools/qset.h:400:23: warning: 'QSet<T> QList<T>::toSet() const [with T = QGeoTileSpec]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] declarativemaps/qdeclarativegeomap.cpp:453:45: warning: 'QSet<T> QList<T>::toSet() const [with T = QObject*]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] qplacemanagerengine_test.h:477:72: warning: 'QSet<T> QList<T>::toSet() const [with T = QPlaceCategory]' is deprecated: Use QSet<T>(list.begin(), list.end()) instead. [-Wdeprecated-declarations] ../utils/qlocationtestutils.cpp:50:31: warning: 'QString& QString::sprintf(const char*, ...)' is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations] Change-Id: Ice04fd0f158ee95a42f53b33dcb7b9204a33c90e Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Unify semicolon usage in Q_UNUSEDJesus Fernandez2019-01-233-3/+3
| | | | | Change-Id: I36dd6881b6f6f028869d63b6311cba7f52a99cc4 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Merge remote-tracking branch 'origin/5.12' into devLiang Qi2018-12-101-5/+24
|\ | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I00453b819d65460dabf771617e6181275461cc78
| * Improve the initialization behavior of CategoryModelPaolo Angelelli2018-11-271-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | CategoryModel was missing an update call in the ::componentComplete callback, as well as reacting on the name changed signal of the plugin. An update call was also missing in the setPlugin method. This patch makes it react on the attached signal instead, and adds missing update calls. Fixes: QTBUG-70254 Change-Id: I1a8de0137b4fe4af7c5ffc848799061147febba2 Reviewed-by: Michael Brasser <michael.brasser@live.com>
* | Move declarative positioning classes to positioningquick, fix exportsPaolo Angelelli2018-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Allow searching along a QGeoRoutePaolo Angelelli2018-11-011-3/+23
|/ | | | | | | | | | | | | | | The result will be backend-dependent. If a backend does not support this, it will be the same as not specifying a search area. The current approach does not expose any new public API, but also does not allow specifying the distance from the route. If this will become necessary, public API might have to be extended. Task-number: QTBUG-69649 Change-Id: I9230d502a6cdb55c620e3a57a0e78cdb6f8955a6 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Enable asynchronous incremental updates of QPlaceReplyPaolo Angelelli2018-07-274-6/+48
| | | | | | | | | | | | | | | | | | | This patch adds a new signal to QPlaceReply, contentUpdated. This signal can be emitted in subclasses when the provider is capable of notifying partial updates of the content. The typical use case if fetching the data from multiple databases, also locally instead of over network, and incrementally populating the results, as opposed to the current way of operating, that is via previous page / next page, in which case it's the backend who provides the proper query parameters to obtain the previous or the next page. This signal is currently handled only for QPlaceSearchReplies in QDeclarativeSearchResultModel, where such a signal would trigger a layout update. Change-Id: I0aaba5aa9249b61c970d3a309d93fab7fc39d667 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix missing overrides in QDeclarativeSearchResultModelPaolo Angelelli2018-07-261-7/+7
| | | | | | | This now triggers compile errors on macOS. Change-Id: I412dd1e3157fd5bf68d0f5fdc125d6eff9d704e7 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Enable incremental updates in PlaceSearchModelPaolo Angelelli2018-07-052-7/+81
| | | | | | | | | | | This way pages can be changed without resetting the model. To achieve this, new members into QPlaceSearchRequestPrivate are introduced, to keep the relationship between a request for one page, and the previous or the next page. In this way sparse population of the model becomes possible. Change-Id: Ic8db0281408f3500ba83f78c7e152ee0b68cd099 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix PlaceSearchModel::data documentationJulian Sherollari2018-05-301-1/+1
| | | | | | | | The return type should be Variant. Change-Id: I78ecf4e0048d28c92e032b65c2fa2f7c75805177 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Fix all documentation warningsTopi Reinio2018-03-2714-16/+16
| | | | | | | | | | | | | | | | | | | | 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>
* Make QPlace extensiblePaolo Angelelli2018-01-272-3/+3
| | | | | | | | This change makes it possible to subclass QPlace with custom private implementations. Change-Id: I363c0e8b7db41d9a8400ce6dbddf5405c619eeef Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use QGeoShapes properly throughout the modulePaolo Angelelli2018-01-091-0/+3
| | | | | | | | Adds proper support to other valid shapes and use ::boundingGeoRectangle where appropriate. Change-Id: Ibba4cb18f5cca08df62d15b76fa0e1f249dc6fbb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add unnecessary break to keep GCC 7 happyThiago Macieira2017-06-061-0/+1
| | | | | | | | | | | Falling through or breaking have the same effect, since the next case label repeats the same condition in the "if", which must necessarily be false for the code to have fallen through. qdeclarativesearchresultmodel.cpp:632:9: error: this statement may fall through [-Werror=implicit-fallthrough=] Change-Id: Ia3e896da908f42939148fffd14c48127381f219d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make error_messages.h privatePaolo Angelelli2017-05-026-6/+6
| | | | | Change-Id: Iba33d12fad113b64cb071f0542a2c92034ff755d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add disclaimer to all private classes in the location modulePaolo Angelelli2017-01-303-0/+33
| | | | | | | | This patch adds the warning disclaimer on a few classes in the location module that still missed it. Change-Id: Idef6cb32b6b628dc82aaaff2630b6b7d7281b774 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Moving location qml implementation to location/declarative*Paolo Angelelli2017-01-2634-0/+8246
QtLocation quick classes and headers are moved out of the import directory. The location quick classes are now in a subdirectory inside the main qtlocation module. This is necessary in order to privately export certain classes, such as Map Items classes, and create an API to inject these objects into QGeoMap to let plugins render the Map Items directly Change-Id: Ia6ba5f07c4eddd3c4c2ce54bf34f1afcd42c2558 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>