summaryrefslogtreecommitdiff
path: root/src/location/doc/snippets
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/snippets
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/snippets')
-rw-r--r--src/location/doc/snippets/places/requesthandler.h6
1 files changed, 2 insertions, 4 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