diff options
author | abcd <qt-info@nokia.com> | 2011-10-13 16:19:49 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-14 04:51:39 +0200 |
commit | c79458d90df501f9095092bc7e997439930f02c0 (patch) | |
tree | e0b2f4f07b1d760543671098336280a4cfbc7122 /src/location/places/qplacesearchrequest.cpp | |
parent | 28eb3ee2e75a735dfd3cf497d201da8d96a57aa0 (diff) | |
download | qtlocation-c79458d90df501f9095092bc7e997439930f02c0.tar.gz |
Allow search to take multiple categories
If multiple categories are provided it is expected that the backend
will effectively perform a union operation. i.e. any places
that match one or more of the categories are returned.
It is possible however that some backends may not support
multiple categories. In this case the first category is used and the
rest ignored.
Change-Id: I50133a1945a775d6961f0ada3b07ef1721d4de24
Reviewed-on: http://codereview.qt-project.org/6567
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/places/qplacesearchrequest.cpp')
-rw-r--r-- | src/location/places/qplacesearchrequest.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/location/places/qplacesearchrequest.cpp b/src/location/places/qplacesearchrequest.cpp index af9080fa..f10832f8 100644 --- a/src/location/places/qplacesearchrequest.cpp +++ b/src/location/places/qplacesearchrequest.cpp @@ -215,6 +215,18 @@ void QPlaceSearchRequest::setCategory(const QPlaceCategory &category) } /*! + Sets the search request to search from the list of given \a categories. + + It is possible that some backends may not support multiple categories. In this case, + the first category is used and the rest are ignored. +*/ +void QPlaceSearchRequest::setCategories(const QList<QPlaceCategory> &categories) +{ + Q_D(QPlaceSearchRequest); + d->categories = categories; +} + +/*! Returns search area. The default search area is a null pointer. */ QGeoBoundingArea *QPlaceSearchRequest::searchArea() const |