summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2017-12-21 17:24:27 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-01-10 17:31:34 +0000
commit0c00f73cebfcfe4308d46c67a6f3345886b9bccb (patch)
tree907c2518b68b88d00cdca2f34366dfa0504468c9 /src/plugins/geoservices/osm/qplacesearchreplyosm.cpp
parent8014727e52c65bf6496ad4adf6c8e7ec33250bb7 (diff)
downloadqtlocation-0c00f73cebfcfe4308d46c67a6f3345886b9bccb.tar.gz
Add debug parameter to OSM plugin to include the request url in results
Change-Id: Ib2c0ba380ed6f5eecc7eb6bec75037a4922a567f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/plugins/geoservices/osm/qplacesearchreplyosm.cpp')
-rw-r--r--src/plugins/geoservices/osm/qplacesearchreplyosm.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp b/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp
index cdb696dd..0228a975 100644
--- a/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp
+++ b/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp
@@ -192,6 +192,13 @@ QPlaceResult QPlaceSearchReplyOsm::parsePlaceResult(const QJsonObject &item) con
place.setName(title);
+ if (!requestUrl.isEmpty()) {
+ QPlaceAttribute attribute;
+ attribute.setLabel("requestUrl");
+ attribute.setText(requestUrl);
+ place.setExtendedAttribute("requestUrl", attribute);
+ }
+
QGeoAddress address;
address.setCity(addressDetails.value(QStringLiteral("city")).toString());
address.setCountry(addressDetails.value(QStringLiteral("country")).toString());