From dd4211eac29aa4152d434e5960f9ba869070cb88 Mon Sep 17 00:00:00 2001 From: Lauri Laanmets Date: Thu, 30 Sep 2021 15:20:52 +0300 Subject: Change 'setBoundingBox' to 'setBoundingShape' https://doc.qt.io/qt-6/qtpositioning-changes-qt6.html#c This is part of a bigger work to port QtLocation maps to Qt6. Task-number: QTBUG-96795 Change-Id: I9c14bd39d2da95a0be6542be432b79e26906c5ed Reviewed-by: Ivan Solovev Reviewed-by: Alex Blasche Reviewed-by: Andreas Buhr --- src/plugins/geoservices/esri/geocodereply_esri.cpp | 2 +- src/plugins/geoservices/esri/placesearchreply_esri.cpp | 2 +- src/plugins/geoservices/mapbox/qmapboxcommon.cpp | 2 +- src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp | 2 +- src/plugins/geoservices/nokia/placesv2/qplacesearchreplyhere.cpp | 2 +- src/plugins/geoservices/nokia/qgeocodejsonparser.cpp | 2 +- src/plugins/geoservices/osm/qgeocodereplyosm.cpp | 2 +- src/plugins/geoservices/osm/qplacesearchreplyosm.cpp | 2 +- tests/auto/qmlinterface/tst_qmlinterface.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/geoservices/esri/geocodereply_esri.cpp b/src/plugins/geoservices/esri/geocodereply_esri.cpp index 51d97882..ea89e6a0 100644 --- a/src/plugins/geoservices/esri/geocodereply_esri.cpp +++ b/src/plugins/geoservices/esri/geocodereply_esri.cpp @@ -197,7 +197,7 @@ QGeoLocation GeoCodeReplyEsri::parseCandidate(const QJsonObject& candidate) QGeoLocation location; location.setCoordinate(coordinate); - location.setBoundingBox(extent); + location.setBoundingShape(extent); location.setAddress(address); return location; diff --git a/src/plugins/geoservices/esri/placesearchreply_esri.cpp b/src/plugins/geoservices/esri/placesearchreply_esri.cpp index a35c9964..0f04a66f 100644 --- a/src/plugins/geoservices/esri/placesearchreply_esri.cpp +++ b/src/plugins/geoservices/esri/placesearchreply_esri.cpp @@ -204,7 +204,7 @@ QPlaceResult PlaceSearchReplyEsri::parsePlaceResult(const QJsonObject &item) con QGeoLocation geoLocation; geoLocation.setCoordinate(coordinate); geoLocation.setAddress(geoAddress); - geoLocation.setBoundingBox(boundingBox); + geoLocation.setBoundingShape(boundingBox); // set place place.setName(keys.value(kLongLabelKey)); diff --git a/src/plugins/geoservices/mapbox/qmapboxcommon.cpp b/src/plugins/geoservices/mapbox/qmapboxcommon.cpp index ce097ce1..7946102e 100644 --- a/src/plugins/geoservices/mapbox/qmapboxcommon.cpp +++ b/src/plugins/geoservices/mapbox/qmapboxcommon.cpp @@ -131,7 +131,7 @@ QGeoLocation QMapboxCommon::parseGeoLocation(const QJsonObject &response) double left = bbox.at(0).toDouble(); double bottom = bbox.at(1).toDouble(); double right = bbox.at(2).toDouble(); - location.setBoundingBox(QGeoRectangle(QGeoCoordinate(top, left), QGeoCoordinate(bottom, right))); + location.setBoundingShape(QGeoRectangle(QGeoCoordinate(top, left), QGeoCoordinate(bottom, right))); QJsonArray center = response.value(QStringLiteral("center")).toArray(); location.setCoordinate(QGeoCoordinate(center.at(1).toDouble(), center.at(0).toDouble())); diff --git a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp index f89a033c..ec9302fd 100644 --- a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp +++ b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp @@ -198,7 +198,7 @@ void QPlaceDetailsReplyImpl::replyFinished() QJsonArray bbox = locationObject.value(QLatin1String("bbox")).toArray(); QGeoRectangle box(QGeoCoordinate(bbox.at(3).toDouble(), bbox.at(0).toDouble()), QGeoCoordinate(bbox.at(1).toDouble(), bbox.at(2).toDouble())); - location.setBoundingBox(box); + location.setBoundingShape(box); } place.setLocation(location); diff --git a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyhere.cpp b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyhere.cpp index ce5c2ac6..993cadb7 100644 --- a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyhere.cpp +++ b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyhere.cpp @@ -163,7 +163,7 @@ QPlaceResult QPlaceSearchReplyHere::parsePlaceResult(const QJsonObject &item) co QJsonArray bbox = item.value(QStringLiteral("bbox")).toArray(); QGeoRectangle box(QGeoCoordinate(bbox.at(3).toDouble(), bbox.at(0).toDouble()), QGeoCoordinate(bbox.at(1).toDouble(), bbox.at(2).toDouble())); - location.setBoundingBox(box); + location.setBoundingShape(box); } place.setLocation(location); diff --git a/src/plugins/geoservices/nokia/qgeocodejsonparser.cpp b/src/plugins/geoservices/nokia/qgeocodejsonparser.cpp index 44488301..71a1cf1b 100644 --- a/src/plugins/geoservices/nokia/qgeocodejsonparser.cpp +++ b/src/plugins/geoservices/nokia/qgeocodejsonparser.cpp @@ -358,7 +358,7 @@ bool parseLocation(const QJsonObject &obj, const QGeoShape &bounds, QGeoLocation loc->setAddress(address); loc->setCoordinate(coordinate); - loc->setBoundingBox(boundingBox); + loc->setBoundingShape(boundingBox); return true; } diff --git a/src/plugins/geoservices/osm/qgeocodereplyosm.cpp b/src/plugins/geoservices/osm/qgeocodereplyosm.cpp index b1335a70..4354fba7 100644 --- a/src/plugins/geoservices/osm/qgeocodereplyosm.cpp +++ b/src/plugins/geoservices/osm/qgeocodereplyosm.cpp @@ -180,7 +180,7 @@ void QGeoCodeReplyOsm::networkReplyFinished() QGeoLocation location; location.setCoordinate(coordinate); - location.setBoundingBox(rectangle); + location.setBoundingShape(rectangle); location.setAddress(parseAddressObject(object)); if (m_includeExtraData) injectExtra(location, object); diff --git a/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp b/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp index 593f476a..3e696685 100644 --- a/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp +++ b/src/plugins/geoservices/osm/qplacesearchreplyosm.cpp @@ -220,7 +220,7 @@ QPlaceResult QPlaceSearchReplyOsm::parsePlaceResult(const QJsonObject &item) con QGeoLocation location; location.setCoordinate(coordinate); location.setAddress(address); - location.setBoundingBox(parseBoundingBox(item.value(QStringLiteral("boundingbox")).toArray())); + location.setBoundingShape(parseBoundingBox(item.value(QStringLiteral("boundingbox")).toArray())); place.setLocation(location); diff --git a/tests/auto/qmlinterface/tst_qmlinterface.cpp b/tests/auto/qmlinterface/tst_qmlinterface.cpp index 11fc3c16..272729bc 100644 --- a/tests/auto/qmlinterface/tst_qmlinterface.cpp +++ b/tests/auto/qmlinterface/tst_qmlinterface.cpp @@ -97,7 +97,7 @@ tst_qmlinterface::tst_qmlinterface() m_rectangle.setWidth(40.0); m_location.setAddress(m_address); - m_location.setBoundingBox(m_rectangle); + m_location.setBoundingShape(m_rectangle); m_location.setCoordinate(m_coordinate); m_category.setName(QStringLiteral("Test category")); -- cgit v1.2.3