diff options
author | abcd <amos.choy@nokia.com> | 2011-11-15 13:40:30 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-16 05:37:54 +0100 |
commit | de751efc4ab7b619698d5bf94fbbb25f67ba8043 (patch) | |
tree | 33ffede814b79cf17a55b045147b21c5207065a9 /src/location | |
parent | 7c12c5ea6eecde65b35ef0b004c2e347f06ec1ad (diff) | |
download | qtlocation-de751efc4ab7b619698d5bf94fbbb25f67ba8043.tar.gz |
Recommendations to use place id instead of place object
For consistency with getPlaceDetails and getPlaceContent,
use a place id as a parameter instead of a place object.
Also provide a default search request parameter.
Also rename element to PlaceRecommendationModel
to be consisent with PlaceSearchModel and
PlaceSearchSuggestionModel
Change-Id: Idc68d8c14dcadcd8d65427fdf65a919d5d4560c5
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location')
-rw-r--r-- | src/location/places/qplacemanager.cpp | 7 | ||||
-rw-r--r-- | src/location/places/qplacemanager.h | 3 | ||||
-rw-r--r-- | src/location/places/qplacemanagerengine.cpp | 5 | ||||
-rw-r--r-- | src/location/places/qplacemanagerengine.h | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/src/location/places/qplacemanager.cpp b/src/location/places/qplacemanager.cpp index 28d181a6..9bab7b32 100644 --- a/src/location/places/qplacemanager.cpp +++ b/src/location/places/qplacemanager.cpp @@ -242,13 +242,14 @@ QPlaceSearchReply *QPlaceManager::search(const QPlaceSearchRequest &request) con } /*! - Provides recommendations for places that are similar to \a place, and using the parameters as specified in \a request. + Provides recommendations for places that are similar to the place identified by \a placeId, + and using the parameters as specified in \a request. See \l {Recommendations} for an example of usage. */ -QPlaceSearchReply *QPlaceManager::recommendations(const QPlace &place, const QPlaceSearchRequest &request) const +QPlaceSearchReply *QPlaceManager::recommendations(const QString &placeId, const QPlaceSearchRequest &request) const { - return d->recommendations(place, request); + return d->recommendations(placeId, request); } /*! diff --git a/src/location/places/qplacemanager.h b/src/location/places/qplacemanager.h index 96a42065..cb3287ef 100644 --- a/src/location/places/qplacemanager.h +++ b/src/location/places/qplacemanager.h @@ -48,6 +48,7 @@ #include "qplacereply.h" #include "qplacedetailsreply.h" #include "qplacesearchsuggestionreply.h" +#include "qplacesearchrequest.h" #include <QLocale> #include <QVector> @@ -95,7 +96,7 @@ public: QPlaceSearchReply *search(const QPlaceSearchRequest &query) const; - QPlaceSearchReply *recommendations(const QPlace &place, const QPlaceSearchRequest &request) const; + QPlaceSearchReply *recommendations(const QString &placeId, const QPlaceSearchRequest &request = QPlaceSearchRequest()) const; QPlaceSearchSuggestionReply *searchSuggestions(const QPlaceSearchRequest &request) const; diff --git a/src/location/places/qplacemanagerengine.cpp b/src/location/places/qplacemanagerengine.cpp index 76ce08df..a3060e25 100644 --- a/src/location/places/qplacemanagerengine.cpp +++ b/src/location/places/qplacemanagerengine.cpp @@ -169,9 +169,10 @@ QPlaceManagerEnginePrivate::~QPlaceManagerEnginePrivate() */ /*! - \fn QPlaceSearchReply *QPlaceManagerEngine::recommendations(const QPlace &place, const QPlaceSearchRequest &request) + \fn QPlaceSearchReply *QPlaceManagerEngine::recommendations(const QString &placeId, const QPlaceSearchRequest &request) - Provides recommendations for places that similar to \a place, and using the parameters as specified in \a request. + Provides recommendations for places that are similar to the place identified by \a placeId, + and using the parameters as specified in \a request. */ /*! diff --git a/src/location/places/qplacemanagerengine.h b/src/location/places/qplacemanagerengine.h index cc868971..08c64c7a 100644 --- a/src/location/places/qplacemanagerengine.h +++ b/src/location/places/qplacemanagerengine.h @@ -69,7 +69,7 @@ public: virtual QPlaceSearchReply *search(const QPlaceSearchRequest &request) = 0; - virtual QPlaceSearchReply *recommendations(const QPlace &place, const QPlaceSearchRequest &request) = 0; + virtual QPlaceSearchReply *recommendations(const QString &placeId, const QPlaceSearchRequest &request) = 0; virtual QPlaceSearchSuggestionReply *searchSuggestions(const QPlaceSearchRequest &request) = 0; virtual QPlaceIdReply *savePlace(const QPlace &place) = 0; |