summaryrefslogtreecommitdiff
path: root/src/location/doc
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@jollamobile.com>2014-01-16 14:32:21 +1000
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-20 02:11:24 +0100
commit1d0966c6924876655c52725e779a7aa24866ff60 (patch)
treebb7220ab3ccce1d057b80af33dbb8dd784d5782e /src/location/doc
parent86db3df8cea7b9ac1e4ae078639de5fb5a43ca69 (diff)
downloadqtlocation-1d0966c6924876655c52725e779a7aa24866ff60.tar.gz
Remove offset attribute from place search requests.
Not all service providers support arbitrary search offsets. The offset attribute has been removed, instead service providers can supply a previous and next search query in the form of a QPlaceSearchRequest. Change-Id: If68e969b06f909f3fa62718656cbef70d1bf84a6 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Diffstat (limited to 'src/location/doc')
-rw-r--r--src/location/doc/snippets/places/requesthandler.h6
-rw-r--r--src/location/doc/src/places.qdoc2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/location/doc/snippets/places/requesthandler.h b/src/location/doc/snippets/places/requesthandler.h
index 92e1a935..8771d294 100644
--- a/src/location/doc/snippets/places/requesthandler.h
+++ b/src/location/doc/snippets/places/requesthandler.h
@@ -100,7 +100,6 @@ public:
{
//! [Search paging]
QPlaceSearchRequest searchRequest;
- searchRequest.setOffset(10); //specify the index of the first result
searchRequest.setLimit(15); //specify how many results are to be retrieved.
//! [Search paging]
}
@@ -220,9 +219,8 @@ public:
//closer places have greater weighting in the ranking of results.
searchRequest.setRelevanceHint(QPlaceSearchRequest::DistanceHint);
- //use offset and limit to provide pagination.
- //this retrieves the next 5 items from the 10th index
- searchRequest.setOffset(9);
+ //use limit to adjust pagination.
+ //this limits the number of place results to 5 per page.
searchRequest.setLimit(5);
//provide some categories to narrow down search
diff --git a/src/location/doc/src/places.qdoc b/src/location/doc/src/places.qdoc
index 62a6d0d5..74a25b79 100644
--- a/src/location/doc/src/places.qdoc
+++ b/src/location/doc/src/places.qdoc
@@ -248,7 +248,7 @@
Any places similar to the given place are retrieved.
\section3 Paging
- If the plugin supports paging, limit and offset parameters may be provided to the search request.
+ If the plugin supports paging, the limit parameter may be provided to the search request.
\snippet places/requesthandler.h Search paging
\section2 Fetching Place Details