summaryrefslogtreecommitdiffstats
path: root/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-14 21:44:54 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2022-09-19 14:52:41 +0200
commitff4207b1a41db4d23d4d0183152776e73f252a3a (patch)
tree7462fc69d09ac167b9af512220d4e819ac0c4b42 /src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
parent29bf63108f954119a0df6c70dd283367777a7e23 (diff)
Cleanup: de-virtualize QGeoCodeReplyPrivate
The only call to the single virtual function, extraData(), was commented out. The subclass in the OSM plugin only wrote extra data for debug runs and the subclass in the mock plugin is never used to test anything anyway. So remove all this overhead. As a drive-by, refactor to member initialization and use qsizetype for members that refer to indices in a QList. Change-Id: I600b4637bc367ae45d51b2a7f9a3ae0b78fb77c4 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Santhosh Kumar <santhosh.kumar.selvaraj@qt.io>
Diffstat (limited to 'src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp')
-rw-r--r--src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
index d91815b2..2ca0bb8f 100644
--- a/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
+++ b/src/plugins/geoservices/osm/qgeocodingmanagerengineosm.cpp
@@ -132,11 +132,6 @@ QGeoCodeReply *QGeoCodingManagerEngineOsm::geocode(const QString &address, int l
QNetworkReply *reply = m_networkManager->get(request);
QGeoCodeReplyOsm *geocodeReply = new QGeoCodeReplyOsm(reply, m_includeExtraData, this);
- if (m_debugQuery) {
- QGeoCodeReplyOsmPrivate *replyPrivate
- = static_cast<QGeoCodeReplyOsmPrivate *>(QGeoCodeReplyPrivate::get(*geocodeReply));
- replyPrivate->m_extraData["request_url"] = url;
- }
connect(geocodeReply, &QGeoCodeReplyOsm::finished,
this, &QGeoCodingManagerEngineOsm::replyFinished);
@@ -169,11 +164,6 @@ QGeoCodeReply *QGeoCodingManagerEngineOsm::reverseGeocode(const QGeoCoordinate &
QNetworkReply *reply = m_networkManager->get(request);
QGeoCodeReplyOsm *geocodeReply = new QGeoCodeReplyOsm(reply, m_includeExtraData, this);
- if (m_debugQuery) {
- QGeoCodeReplyOsmPrivate *replyPrivate
- = static_cast<QGeoCodeReplyOsmPrivate *>(QGeoCodeReplyPrivate::get(*geocodeReply));
- replyPrivate->m_extraData["request_url"] = url;
- }
connect(geocodeReply, &QGeoCodeReplyOsm::finished,
this, &QGeoCodingManagerEngineOsm::replyFinished);