summaryrefslogtreecommitdiff
path: root/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2012-02-14 13:58:22 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-20 00:22:40 +0100
commitf2f8d5dc1c74024827019378424dcf59ba3096ed (patch)
treea73bb19ba75a8b4dc664f6201bb5bd6cde139fb4 /tests/auto/geotestplugin/qgeocodingmanagerengine_test.h
parent9b7cf2b63fb9f9ff7b3c5f05b8e916c85c66403b (diff)
downloadqtlocation-f2f8d5dc1c74024827019378424dcf59ba3096ed.tar.gz
Convert QGeoBoundingArea to use value type semantics.
This simplifies the API while keeping the same functionality. Objects of type QGeoBoundingCircle and QGeoBoundingBox can still be passed around as QGeoBoundingArea without losing their identity. QGeoBoundingArea::isValid(), ::isEmpty() and ::contains() function as one would expect. This change removes the necessity of the application developer to track and delete pointers. Change-Id: I1ee70af90319da4c77225c6a0a03601d5ff431f1 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'tests/auto/geotestplugin/qgeocodingmanagerengine_test.h')
-rw-r--r--tests/auto/geotestplugin/qgeocodingmanagerengine_test.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h b/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h
index fbd743c4..51fe3dd0 100644
--- a/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h
+++ b/tests/auto/geotestplugin/qgeocodingmanagerengine_test.h
@@ -68,7 +68,7 @@ public:
void callSetLimit ( int limit ) {setLimit(limit);}
void callSetOffset ( int offset ) {setOffset(offset);}
void callSetLocations ( const QList<QGeoLocation> & locations ) {setLocations(locations);}
- void callSetViewport ( QGeoBoundingArea * viewport ) {setViewport(viewport);}
+ void callSetViewport ( const QGeoBoundingArea &viewport ) {setViewport(viewport);}
void abort() {
emit aborted();
}
@@ -108,7 +108,7 @@ public:
QGeocodeReply* geocode(const QString &searchString,
int limit = -1,
int offset = 0,
- QGeoBoundingArea *bounds = 0)
+ const QGeoBoundingArea &bounds = QGeoBoundingArea())
{
geocodeReply_ = new GeocodeReplyTest();
connect(geocodeReply_, SIGNAL(aborted()), this, SLOT(requestAborted()));
@@ -140,7 +140,7 @@ public:
return static_cast<QGeocodeReply*>(geocodeReply_);
}
- QGeocodeReply* geocode ( const QGeoAddress & address, QGeoBoundingArea * bounds )
+ QGeocodeReply* geocode ( const QGeoAddress & address, const QGeoBoundingArea &bounds )
{
geocodeReply_ = new GeocodeReplyTest();
connect(geocodeReply_, SIGNAL(aborted()), this, SLOT(requestAborted()));
@@ -227,7 +227,7 @@ public:
}
}
- QGeocodeReply* reverseGeocode ( const QGeoCoordinate & coordinate, QGeoBoundingArea * bounds )
+ QGeocodeReply* reverseGeocode ( const QGeoCoordinate & coordinate, const QGeoBoundingArea &bounds )
{
geocodeReply_ = new GeocodeReplyTest();
connect(geocodeReply_, SIGNAL(aborted()), this, SLOT(requestAborted()));