summaryrefslogtreecommitdiff
path: root/src/plugins/geoservices
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2012-06-19 12:55:53 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-21 04:09:32 +0200
commit6b68304f59de5fa3f6c861186d98b0c7fe54a4ba (patch)
tree1d94a6db5a3ad399149e44510a86c008c58814f2 /src/plugins/geoservices
parent4b10442e2e83bf7440837e469af344579d1ad9d5 (diff)
downloadqtlocation-6b68304f59de5fa3f6c861186d98b0c7fe54a4ba.tar.gz
Rename QGeoBoundingArea and related classes to QGeoShape.
QGeoBoundingArea is used for describing more than just a bounding area. Renaming it to a more appropriate name, QGeoShape. The same is done for subclasses and QML equivalents. In C++: QGeoBoundingArea -> QGeoShape QGeoBoundingCircle -> QGeoCircle QGeoBoundingBox -> QGeoRectangle In QML: BoundingArea -> GeoShape BoundingCircle -> GeoCircle BoundingBox -> GeoRectangle Change-Id: I93c6df8f1b6c5179ed52fd8354a05f709063b1cf Reviewed-by: abcd <amos.choy@nokia.com>
Diffstat (limited to 'src/plugins/geoservices')
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp2
-rw-r--r--src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp2
-rw-r--r--src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp6
-rw-r--r--src/plugins/geoservices/nokia/qgeocodereply_nokia.h2
-rw-r--r--src/plugins/geoservices/nokia/qgeocodexmlparser.cpp9
-rw-r--r--src/plugins/geoservices/nokia/qgeocodexmlparser.h4
-rw-r--r--src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp8
-rw-r--r--src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h8
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp8
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutexmlparser.h4
-rw-r--r--src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp10
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp6
-rw-r--r--src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h4
-rw-r--r--src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp14
-rw-r--r--src/plugins/geoservices/nokia_places_jsondb/jsondb.cpp6
-rw-r--r--src/plugins/geoservices/nokia_places_jsondb/matchreply.cpp2
-rw-r--r--src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp2
-rw-r--r--src/plugins/geoservices/nokia_places_jsondb/searchreply.cpp22
18 files changed, 62 insertions, 57 deletions
diff --git a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
index 74c39dcd..404d4cb6 100644
--- a/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/placesv2/qplacedetailsreplyimpl.cpp
@@ -208,7 +208,7 @@ void QPlaceDetailsReplyImpl::replyFinished()
if (locationObject.contains(QLatin1String("bbox"))) {
QJsonArray bbox = locationObject.value(QLatin1String("bbox")).toArray();
- QGeoBoundingBox box(QGeoCoordinate(bbox.at(3).toDouble(), bbox.at(0).toDouble()),
+ QGeoRectangle box(QGeoCoordinate(bbox.at(3).toDouble(), bbox.at(0).toDouble()),
QGeoCoordinate(bbox.at(1).toDouble(), bbox.at(2).toDouble()));
location.setBoundingBox(box);
}
diff --git a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
index 17244d73..db97dffb 100644
--- a/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
+++ b/src/plugins/geoservices/nokia/placesv2/qplacesearchreplyimpl.cpp
@@ -132,7 +132,7 @@ void QPlaceSearchReplyImpl::replyFinished()
if (item.contains(QLatin1String("bbox"))) {
QJsonArray bbox = item.value(QLatin1String("bbox")).toArray();
- QGeoBoundingBox box(QGeoCoordinate(bbox.at(3).toDouble(), bbox.at(0).toDouble()),
+ QGeoRectangle box(QGeoCoordinate(bbox.at(3).toDouble(), bbox.at(0).toDouble()),
QGeoCoordinate(bbox.at(1).toDouble(), bbox.at(2).toDouble()));
location.setBoundingBox(box);
}
diff --git a/src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp b/src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp
index 26d9e23c..d16fef4c 100644
--- a/src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp
@@ -49,10 +49,12 @@
#include "qgeocodereply_nokia.h"
#include "qgeocodexmlparser.h"
+#include <QtLocation/QGeoShape>
+
QT_BEGIN_NAMESPACE
QGeocodeReplyNokia::QGeocodeReplyNokia(QNetworkReply *reply, int limit, int offset,
- const QGeoBoundingArea &viewport, QObject *parent)
+ const QGeoShape &viewport, QObject *parent)
: QGeocodeReply(parent),
m_reply(reply)
{
@@ -103,7 +105,7 @@ void QGeocodeReplyNokia::networkFinished()
QGeoCodeXmlParser parser;
if (parser.parse(m_reply)) {
QList<QGeoLocation> locations = parser.results();
- QGeoBoundingArea bounds = viewport();
+ QGeoShape bounds = viewport();
if (bounds.isValid()) {
for (int i = locations.size() - 1; i >= 0; --i) {
if (!bounds.contains(locations[i].coordinate()))
diff --git a/src/plugins/geoservices/nokia/qgeocodereply_nokia.h b/src/plugins/geoservices/nokia/qgeocodereply_nokia.h
index 41cd83b1..844151a2 100644
--- a/src/plugins/geoservices/nokia/qgeocodereply_nokia.h
+++ b/src/plugins/geoservices/nokia/qgeocodereply_nokia.h
@@ -58,7 +58,7 @@ class QGeocodeReplyNokia : public QGeocodeReply
{
Q_OBJECT
public:
- QGeocodeReplyNokia(QNetworkReply *reply, int limit, int offset, const QGeoBoundingArea &viewport, QObject *parent = 0);
+ QGeocodeReplyNokia(QNetworkReply *reply, int limit, int offset, const QGeoShape &viewport, QObject *parent = 0);
~QGeocodeReplyNokia();
void abort();
diff --git a/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp b/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp
index c3de21ec..8a63b468 100644
--- a/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp
+++ b/src/plugins/geoservices/nokia/qgeocodexmlparser.cpp
@@ -52,6 +52,9 @@
#include <QIODevice>
#include <qgeolocation.h>
+#include <QtLocation/QGeoAddress>
+#include <QtLocation/QGeoCoordinate>
+#include <QtLocation/QGeoRectangle>
QT_BEGIN_NAMESPACE
@@ -303,7 +306,7 @@ bool QGeoCodeXmlParser::parseLocation(QGeoLocation *location)
return false;
}
- QGeoBoundingBox bounds;
+ QGeoRectangle bounds;
if (!parseBoundingBox(&bounds))
return false;
@@ -441,7 +444,7 @@ bool QGeoCodeXmlParser::parseAddress(QGeoAddress *address)
return false;
}
-bool QGeoCodeXmlParser::parseBoundingBox(QGeoBoundingBox *bounds)
+bool QGeoCodeXmlParser::parseBoundingBox(QGeoRectangle *bounds)
{
/*
<xsd:complexType name="GeoBox">
@@ -489,7 +492,7 @@ bool QGeoCodeXmlParser::parseBoundingBox(QGeoBoundingBox *bounds)
return false;
}
- *bounds = QGeoBoundingBox(nw, se);
+ *bounds = QGeoRectangle(nw, se);
return true;
}
diff --git a/src/plugins/geoservices/nokia/qgeocodexmlparser.h b/src/plugins/geoservices/nokia/qgeocodexmlparser.h
index 20ef848b..0ec9eb28 100644
--- a/src/plugins/geoservices/nokia/qgeocodexmlparser.h
+++ b/src/plugins/geoservices/nokia/qgeocodexmlparser.h
@@ -58,7 +58,7 @@ QT_BEGIN_NAMESPACE
class QIODevice;
class QGeoLocation;
class QGeoAddress;
-class QGeoBoundingBox;
+class QGeoRectangle;
class QGeoCoordinate;
class QXmlStreamReader;
@@ -78,7 +78,7 @@ private:
bool parsePlace(QGeoLocation *location);
bool parseLocation(QGeoLocation *location);
bool parseAddress(QGeoAddress *address);
- bool parseBoundingBox(QGeoBoundingBox *bounds);
+ bool parseBoundingBox(QGeoRectangle *bounds);
bool parseCoordinate(QGeoCoordinate *coordinate, const QString &elementName);
QScopedPointer<QXmlStreamReader> m_reader;
diff --git a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp
index 7f783692..e6a66623 100644
--- a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.cpp
@@ -107,7 +107,7 @@ QString QGeocodingManagerEngineNokia::getAuthenticationString() const
QGeocodeReply *QGeocodingManagerEngineNokia::geocode(const QGeoAddress &address,
- const QGeoBoundingArea &bounds)
+ const QGeoShape &bounds)
{
QString requestString = "http://";
requestString += m_uriProvider->getCurrentHost();
@@ -176,7 +176,7 @@ QGeocodeReply *QGeocodingManagerEngineNokia::geocode(const QGeoAddress &address,
}
QGeocodeReply *QGeocodingManagerEngineNokia::reverseGeocode(const QGeoCoordinate &coordinate,
- const QGeoBoundingArea &bounds)
+ const QGeoShape &bounds)
{
QString requestString = "http://";
requestString += m_uriProvider->getCurrentHost();
@@ -198,7 +198,7 @@ QGeocodeReply *QGeocodingManagerEngineNokia::reverseGeocode(const QGeoCoordinate
QGeocodeReply *QGeocodingManagerEngineNokia::geocode(const QString &address,
int limit,
int offset,
- const QGeoBoundingArea &bounds)
+ const QGeoShape &bounds)
{
QString requestString = "http://";
requestString += m_uriProvider->getCurrentHost();
@@ -226,7 +226,7 @@ QGeocodeReply *QGeocodingManagerEngineNokia::geocode(const QString &address,
}
QGeocodeReply *QGeocodingManagerEngineNokia::geocode(QString requestString,
- const QGeoBoundingArea &bounds,
+ const QGeoShape &bounds,
int limit,
int offset)
{
diff --git a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h
index 0b6d34d4..abe29785 100644
--- a/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h
+++ b/src/plugins/geoservices/nokia/qgeocodingmanagerengine_nokia.h
@@ -72,14 +72,14 @@ public:
~QGeocodingManagerEngineNokia();
QGeocodeReply *geocode(const QGeoAddress &address,
- const QGeoBoundingArea &bounds);
+ const QGeoShape &bounds);
QGeocodeReply *reverseGeocode(const QGeoCoordinate &coordinate,
- const QGeoBoundingArea &bounds);
+ const QGeoShape &bounds);
QGeocodeReply *geocode(const QString &searchString,
int limit,
int offset,
- const QGeoBoundingArea &bounds);
+ const QGeoShape &bounds);
private Q_SLOTS:
void placesFinished();
@@ -87,7 +87,7 @@ private Q_SLOTS:
private:
static QString trimDouble(double degree, int decimalDigits = 10);
- QGeocodeReply *geocode(QString requestString, const QGeoBoundingArea &bounds, int limit = -1, int offset = 0);
+ QGeocodeReply *geocode(QString requestString, const QGeoShape &bounds, int limit = -1, int offset = 0);
QString languageToMarc(QLocale::Language language);
QString getAuthenticationString() const;
diff --git a/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp b/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
index 73315441..afa1244f 100644
--- a/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
+++ b/src/plugins/geoservices/nokia/qgeoroutexmlparser.cpp
@@ -54,7 +54,7 @@
#include <QString>
#include <qgeoroute.h>
-#include <qgeoboundingbox.h>
+#include <QtLocation/QGeoRectangle>
QT_BEGIN_NAMESPACE
@@ -173,7 +173,7 @@ bool QGeoRouteXmlParser::parseRoute(QGeoRoute *route)
return false;
route->setPath(path);
} else if (m_reader->name() == "BoundingBox") {
- QGeoBoundingBox bounds;
+ QGeoRectangle bounds;
if (!parseBoundingBox(bounds))
return false;
route->setBounds(bounds);
@@ -556,7 +556,7 @@ bool QGeoRouteXmlParser::parseGeoPoints(const QString &strPoints, QList<QGeoCoor
return true;
}
-bool QGeoRouteXmlParser::parseBoundingBox(QGeoBoundingBox &bounds)
+bool QGeoRouteXmlParser::parseBoundingBox(QGeoRectangle &bounds)
{
Q_ASSERT(m_reader->isStartElement() && m_reader->name() == "BoundingBox");
@@ -586,7 +586,7 @@ bool QGeoRouteXmlParser::parseBoundingBox(QGeoBoundingBox &bounds)
return false;
if (tl.isValid() && br.isValid()) {
- bounds = QGeoBoundingBox(tl, br);
+ bounds = QGeoRectangle(tl, br);
return true;
}
diff --git a/src/plugins/geoservices/nokia/qgeoroutexmlparser.h b/src/plugins/geoservices/nokia/qgeoroutexmlparser.h
index 98241609..d33ffafe 100644
--- a/src/plugins/geoservices/nokia/qgeoroutexmlparser.h
+++ b/src/plugins/geoservices/nokia/qgeoroutexmlparser.h
@@ -62,7 +62,7 @@ class QIODevice;
class QXmlStreamReader;
class QGeoRoute;
class QGeoCoordinate;
-class QGeoBoundingBox;
+class QGeoRectangle;
class QGeoManeuverContainer
{
@@ -115,7 +115,7 @@ private:
bool parseLink();
bool postProcessRoute(QGeoRoute *route);
- bool parseBoundingBox(QGeoBoundingBox &bounds);
+ bool parseBoundingBox(QGeoRectangle &bounds);
bool parseDynamicSpeedInfo(QGeoDynamicSpeedInfoContainer &speedInfo);
QGeoRouteRequest m_request;
diff --git a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
index b9a352c1..18ecef97 100644
--- a/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeoroutingmanagerengine_nokia.cpp
@@ -55,7 +55,7 @@
#include <QStringList>
#include <QUrl>
#include <QLocale>
-#include <qgeoboundingbox.h>
+#include <QtLocation/QGeoRectangle>
QT_BEGIN_NAMESPACE
@@ -371,10 +371,10 @@ QString QGeoRoutingManagerEngineNokia::routeRequestString(const QGeoRouteRequest
{
QString requestString;
- const QList<QGeoBoundingBox> excludeAreas = request.excludeAreas();
- QList<QGeoBoundingBox>::const_iterator beg = excludeAreas.begin();
- QList<QGeoBoundingBox>::const_iterator end = excludeAreas.begin();
- for (QList<QGeoBoundingBox>::const_iterator it = beg; it != end; ++it) {
+ const QList<QGeoRectangle> excludeAreas = request.excludeAreas();
+ QList<QGeoRectangle>::const_iterator beg = excludeAreas.begin();
+ QList<QGeoRectangle>::const_iterator end = excludeAreas.begin();
+ for (QList<QGeoRectangle>::const_iterator it = beg; it != end; ++it) {
requestString += QLatin1String("&avoidareas=");
requestString += trimDouble(it->topLeft().latitude());
requestString += QLatin1String(",");
diff --git a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
index f17be015..e7f63efa 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
+++ b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.cpp
@@ -181,7 +181,7 @@ void QGeoTiledMappingManagerEngineNokia::loadCopyrightsDescriptorsFromJson(const
qreal left = box[1].toDouble();
qreal bottom = box[2].toDouble();
qreal right = box[3].toDouble();
- QGeoBoundingBox boundingBox(QGeoCoordinate(top > bottom? top : bottom,
+ QGeoRectangle boundingBox(QGeoCoordinate(top > bottom? top : bottom,
left),
QGeoCoordinate(top > bottom? bottom : top,
right));
@@ -198,7 +198,7 @@ QString QGeoTiledMappingManagerEngineNokia::evaluateCopyrightsText(const QGeoMap
const QSet<QGeoTileSpec> &tiles)
{
typedef QSet<QGeoTileSpec>::const_iterator tile_iter;
- QGeoBoundingBox viewport;
+ QGeoRectangle viewport;
double viewX0, viewY0, viewX1, viewY1;
tile_iter tile = tiles.constBegin();
@@ -247,7 +247,7 @@ QString QGeoTiledMappingManagerEngineNokia::evaluateCopyrightsText(const QGeoMap
if (descriptorList[descIndex].minLevel <= zoomLevel && zoomLevel <= descriptorList[descIndex].maxLevel) {
descriptor = &descriptorList[descIndex];
for (boxIndex = 0; boxIndex < descriptor->boxes.count(); boxIndex++) {
- QGeoBoundingBox box = descriptor->boxes[boxIndex];
+ QGeoRectangle box = descriptor->boxes[boxIndex];
QGeoCoordinate topRight = box.topRight();
QGeoCoordinate bottomLeft = box.bottomLeft();
diff --git a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h
index 693b9266..553d6dae 100644
--- a/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h
+++ b/src/plugins/geoservices/nokia/qgeotiledmappingmanagerengine_nokia.h
@@ -50,7 +50,7 @@
#define QGEOTILEDMAPPINGMANAGERENGINE_NOKIA_H
#include "qgeotiledmappingmanagerengine_p.h"
-#include "qgeoboundingbox.h"
+#include <QtLocation/QGeoRectangle>
#include "qgeomaptype_p.h"
#include <QGeoServiceProvider>
@@ -94,7 +94,7 @@ private:
qreal maxLevel;
qreal minLevel;
- QList<QGeoBoundingBox> boxes;
+ QList<QGeoRectangle> boxes;
QString alt;
QString label;
};
diff --git a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
index 02205e63..0ecf0cb0 100644
--- a/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
+++ b/src/plugins/geoservices/nokia/qplacemanagerengine_nokiav2.cpp
@@ -71,7 +71,7 @@
#include <QtNetwork/QNetworkProxyFactory>
#include <QtLocation/QPlaceContentRequest>
-#include <QtLocation/QGeoBoundingCircle>
+#include <QtLocation/QGeoCircle>
QT_BEGIN_NAMESPACE
@@ -346,18 +346,18 @@ QPlaceContentReply *QPlaceManagerEngineNokiaV2::getPlaceContent(const QString &p
return reply;
}
-static void addAtForBoundingArea(const QGeoBoundingArea &area,
+static void addAtForBoundingArea(const QGeoShape &area,
QUrlQuery *queryItems)
{
QGeoCoordinate center;
switch (area.type()) {
- case QGeoBoundingArea::BoxType:
- center = QGeoBoundingBox(area).center();
+ case QGeoShape::RectangleType:
+ center = QGeoRectangle(area).center();
break;
- case QGeoBoundingArea::CircleType:
- center = QGeoBoundingCircle(area).center();
+ case QGeoShape::CircleType:
+ center = QGeoCircle(area).center();
break;
- case QGeoBoundingArea::UnknownType:
+ case QGeoShape::UnknownType:
break;
}
diff --git a/src/plugins/geoservices/nokia_places_jsondb/jsondb.cpp b/src/plugins/geoservices/nokia_places_jsondb/jsondb.cpp
index 05dd0744..69ee138d 100644
--- a/src/plugins/geoservices/nokia_places_jsondb/jsondb.cpp
+++ b/src/plugins/geoservices/nokia_places_jsondb/jsondb.cpp
@@ -41,7 +41,6 @@
#include "icon.h"
#include "jsondb.h"
-#include "qgeoboundingcircle.h"
#include "qplacemanagerengine_jsondb.h"
#include <QtCore/QDebug>
@@ -53,6 +52,7 @@
#include <QtJsonDb/QJsonDbWriteRequest>
#include <QtLocation/QPlaceSearchRequest>
#include <QtLocation/QPlaceCategory>
+#include <QtLocation/QGeoCircle>
const QLatin1String JsonDb::Uuid("_uuid");
const QLatin1String JsonDb::Type("_type");
@@ -847,9 +847,9 @@ void JsonDb::searchForPlaces(const QPlaceSearchRequest &request, QObject *parent
queryString += QString::fromLatin1("]");
}
- if (request.searchArea().type() == QGeoBoundingArea::BoxType) {
+ if (request.searchArea().type() == QGeoShape::RectangleType) {
const double epsilon = 0.0001;
- QGeoBoundingBox box(request.searchArea());
+ QGeoRectangle box(request.searchArea());
double tly = box.topLeft().latitude();
double bry = box.bottomRight().latitude();
double tlx = box.topLeft().longitude();
diff --git a/src/plugins/geoservices/nokia_places_jsondb/matchreply.cpp b/src/plugins/geoservices/nokia_places_jsondb/matchreply.cpp
index 331ae5c3..e90e5c38 100644
--- a/src/plugins/geoservices/nokia_places_jsondb/matchreply.cpp
+++ b/src/plugins/geoservices/nokia_places_jsondb/matchreply.cpp
@@ -46,7 +46,7 @@
#include <QtCore/QJsonArray>
#include <QtCore/QDebug>
#include <QtJsonDb/QJsonDbReadRequest>
-#include <QtLocation/QGeoBoundingCircle>
+#include <QtLocation/QGeoCircle>
MatchReply::MatchReply(QPlaceManagerEngineJsonDb *engine)
: QPlaceMatchReply(engine), m_engine(engine)
diff --git a/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp b/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp
index 92f8d046..eb28eca4 100644
--- a/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp
+++ b/src/plugins/geoservices/nokia_places_jsondb/qplacemanagerengine_jsondb.cpp
@@ -262,7 +262,7 @@ QPlace QPlaceManagerEngineJsonDb::compatiblePlace(const QPlace &original) const
QGeoCoordinate coord = original.location().coordinate();
coord.setAltitude(qQNaN());
location.setCoordinate(coord);
- location.setBoundingBox(QGeoBoundingBox());
+ location.setBoundingBox(QGeoRectangle());
place.setLocation(location);
QList<QPlaceContactDetail> details;
diff --git a/src/plugins/geoservices/nokia_places_jsondb/searchreply.cpp b/src/plugins/geoservices/nokia_places_jsondb/searchreply.cpp
index 6c2ae59a..4a6ceab7 100644
--- a/src/plugins/geoservices/nokia_places_jsondb/searchreply.cpp
+++ b/src/plugins/geoservices/nokia_places_jsondb/searchreply.cpp
@@ -43,7 +43,7 @@
#include <QtCore/qnumeric.h>
#include <QtCore/QDebug>
-#include <QtLocation/QGeoBoundingCircle>
+#include <QtLocation/QGeoCircle>
#include <QtJsonDb/QJsonDbReadRequest>
#include <QtLocation/QPlaceResult>
@@ -73,15 +73,15 @@ void SearchReply::setRequest(const QPlaceSearchRequest &request)
void SearchReply::start()
{
- if (request().searchArea().type() == QGeoBoundingArea::BoxType) {
- QGeoBoundingBox box(request().searchArea());
+ if (request().searchArea().type() == QGeoShape::RectangleType) {
+ QGeoRectangle box(request().searchArea());
if (!box.isValid()) {
triggerDone(QPlaceReply::BadArgumentError,
QString::fromLatin1("Bounding box search area is invalid"));
return;
}
- } else if (request().searchArea().type() == QGeoBoundingArea::CircleType) {
- QGeoBoundingCircle circle(request().searchArea());
+ } else if (request().searchArea().type() == QGeoShape::CircleType) {
+ QGeoCircle circle(request().searchArea());
if (!circle.center().isValid() || qIsNaN(circle.center().latitude()) || qIsNaN(circle.center().longitude())) {
triggerDone(QPlaceReply::BadArgumentError,
QString::fromLatin1("The center of the search area is an invalid coordinate"));
@@ -122,13 +122,13 @@ void SearchReply::searchFinished()
QList<QPlaceResult> results;
QPlaceResult result;
- const QGeoBoundingArea &area = request().searchArea();
- const QGeoBoundingArea::AreaType &type = area.type();
- const QGeoCoordinate &center = type == QGeoBoundingArea::CircleType ? static_cast<QGeoBoundingCircle>(area).center() :
- type == QGeoBoundingArea::BoxType ? static_cast<QGeoBoundingBox>(area).center() :
+ const QGeoShape &area = request().searchArea();
+ const QGeoShape::ShapeType &type = area.type();
+ const QGeoCoordinate &center = type == QGeoShape::CircleType ? static_cast<QGeoCircle>(area).center() :
+ type == QGeoShape::RectangleType ? static_cast<QGeoRectangle>(area).center() :
QGeoCoordinate();
- const bool noDistanceFilter = type == QGeoBoundingArea::CircleType
- && static_cast<QGeoBoundingCircle>(area).radius() < 0.0;
+ const bool noDistanceFilter = type == QGeoShape::CircleType
+ && static_cast<QGeoCircle>(area).radius() < 0.0;
// First filter the results
foreach (const QPlace &place, places) {