diff options
author | Aaron McCarthy <aaron.mccarthy@nokia.com> | 2012-02-14 13:58:22 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-20 00:22:40 +0100 |
commit | f2f8d5dc1c74024827019378424dcf59ba3096ed (patch) | |
tree | a73bb19ba75a8b4dc664f6201bb5bd6cde139fb4 /tests/auto/qgeocodingmanagerplugins | |
parent | 9b7cf2b63fb9f9ff7b3c5f05b8e916c85c66403b (diff) | |
download | qtlocation-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/qgeocodingmanagerplugins')
-rw-r--r-- | tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h b/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h index 9022362b..4c1a2e66 100644 --- a/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h +++ b/tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerengine_test.h @@ -65,7 +65,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);} }; @@ -85,7 +85,7 @@ public: setLocale(QLocale(QLocale::German, QLocale::Germany)); } - QGeocodeReply* geocode ( const QString & searchString, int limit, int offset, QGeoBoundingArea * bounds ) + QGeocodeReply* geocode ( const QString & searchString, int limit, int offset, const QGeoBoundingArea &bounds ) { GeocodeReplyTest *geocodereply = new GeocodeReplyTest(); geocodereply->callSetLimit(limit); @@ -98,7 +98,7 @@ public: return static_cast<QGeocodeReply*>(geocodereply); } - QGeocodeReply* geocode ( const QGeoAddress & address, QGeoBoundingArea * bounds ) + QGeocodeReply* geocode ( const QGeoAddress & address, const QGeoBoundingArea &bounds ) { GeocodeReplyTest *geocodereply = new GeocodeReplyTest(); geocodereply->callSetViewport(bounds); @@ -109,7 +109,7 @@ public: return static_cast<QGeocodeReply*>(geocodereply); } - QGeocodeReply* reverseGeocode ( const QGeoCoordinate & coordinate, QGeoBoundingArea * bounds ) + QGeocodeReply* reverseGeocode ( const QGeoCoordinate & coordinate, const QGeoBoundingArea &bounds ) { GeocodeReplyTest *geocodereply = new GeocodeReplyTest(); geocodereply->callSetViewport(bounds); |