summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <mccarthy.aaron@gmail.com>2013-04-06 10:10:47 +1000
committerAlex <ablasche@gmail.com>2013-04-08 02:11:36 +0200
commit661698a967af2fb8d980245694b7bd40e7f72d7a (patch)
tree50f706495661921684c789c097a471783a1a82a1 /src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
parentf1fee68a6716304be54d0219d25ad60bd048dc40 (diff)
downloadqtlocation-661698a967af2fb8d980245694b7bd40e7f72d7a.tar.gz
Fix geocoding in OSM plugin.
The signature of one of the geocode() functions did not match the virtual function defined in the base class. Change the signature to match that of the virtual function it was intended to reimplement. Mark all overridden virtual functions in this class with Q_DECL_OVERRIDE. Change-Id: Ife89f551591a8d064a6f708a7ac29571483a07c0 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Alex <ablasche@gmail.com>
Diffstat (limited to 'src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp')
-rw-r--r--src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
index 4119329c..a97913d5 100644
--- a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
@@ -92,10 +92,10 @@ QGeocodingManagerEngineOsm::~QGeocodingManagerEngineOsm()
QGeocodeReply *QGeocodingManagerEngineOsm::geocode(const QGeoAddress &address, const QGeoShape &bounds)
{
- return geocode(address, -1, -1, bounds);
+ return geocode(addressToQuery(address), -1, -1, bounds);
}
-QGeocodeReply *QGeocodingManagerEngineOsm::geocode(const QGeoAddress &address, int limit, int offset, const QGeoShape &bounds)
+QGeocodeReply *QGeocodingManagerEngineOsm::geocode(const QString &address, int limit, int offset, const QGeoShape &bounds)
{
Q_UNUSED(offset)
@@ -104,7 +104,7 @@ QGeocodeReply *QGeocodingManagerEngineOsm::geocode(const QGeoAddress &address, i
QUrl url(QStringLiteral("http://nominatim.openstreetmap.org/search"));
QUrlQuery query;
- query.addQueryItem(QStringLiteral("q"), addressToQuery(address));
+ query.addQueryItem(QStringLiteral("q"), address);
query.addQueryItem(QStringLiteral("format"), QStringLiteral("json"));
query.addQueryItem(QStringLiteral("accept-language"), locale().name().left(2));
//query.addQueryItem(QStringLiteral("countrycodes"), QStringLiteral("au,jp"));