summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/osm/qplacemanagerengineosm.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/qplacemanagerengineosm.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/qplacemanagerengineosm.cpp')
-rw-r--r--src/plugins/geoservices/osm/qplacemanagerengineosm.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
index 16632b67..01398346 100644
--- a/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qplacemanagerengineosm.cpp
@@ -108,6 +108,10 @@ QPlaceManagerEngineOsm::QPlaceManagerEngineOsm(const QVariantMap &parameters,
else
m_urlPrefix = QStringLiteral("http://nominatim.openstreetmap.org/search");
+
+ if (parameters.contains(QStringLiteral("osm.places.debug_query")))
+ m_debugQuery = parameters.value(QStringLiteral("osm.places.debug_query")).toBool();
+
*error = QGeoServiceProvider::NoError;
errorString->clear();
}
@@ -178,6 +182,9 @@ QPlaceSearchReply *QPlaceManagerEngineOsm::search(const QPlaceSearchRequest &req
connect(reply, SIGNAL(error(QPlaceReply::Error,QString)),
this, SLOT(replyError(QPlaceReply::Error,QString)));
+ if (m_debugQuery)
+ reply->requestUrl = requestUrl.toString();
+
return reply;
}