summaryrefslogtreecommitdiff
path: root/src/location/places/qplacesearchrequest.cpp
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/places/qplacesearchrequest.cpp
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/places/qplacesearchrequest.cpp')
-rw-r--r--src/location/places/qplacesearchrequest.cpp28
1 files changed, 1 insertions, 27 deletions
diff --git a/src/location/places/qplacesearchrequest.cpp b/src/location/places/qplacesearchrequest.cpp
index c5878b22..81cfeba4 100644
--- a/src/location/places/qplacesearchrequest.cpp
+++ b/src/location/places/qplacesearchrequest.cpp
@@ -68,7 +68,6 @@ public:
QLocation::VisibilityScope visibilityScope;
QPlaceSearchRequest::RelevanceHint relevanceHint;
int limit;
- int offset;
QVariant searchContext;
};
@@ -76,7 +75,7 @@ QPlaceSearchRequestPrivate::QPlaceSearchRequestPrivate()
: QSharedData(),
visibilityScope(QLocation::UnspecifiedVisibility),
relevanceHint(QPlaceSearchRequest::UnspecifiedHint),
- limit(-1), offset(0)
+ limit(-1)
{
}
@@ -89,7 +88,6 @@ QPlaceSearchRequestPrivate::QPlaceSearchRequestPrivate(const QPlaceSearchRequest
visibilityScope(other.visibilityScope),
relevanceHint(other.relevanceHint),
limit(other.limit),
- offset(other.offset),
searchContext(other.searchContext)
{
}
@@ -108,7 +106,6 @@ QPlaceSearchRequestPrivate &QPlaceSearchRequestPrivate::operator=(const QPlaceSe
visibilityScope = other.visibilityScope;
relevanceHint = other.relevanceHint;
limit = other.limit;
- offset = other.offset;
searchContext = other.searchContext;
}
@@ -124,14 +121,12 @@ bool QPlaceSearchRequestPrivate::operator==(const QPlaceSearchRequestPrivate &ot
visibilityScope == other.visibilityScope &&
relevanceHint == other.relevanceHint &&
limit == other.limit &&
- offset == other.offset &&
searchContext == other.searchContext;
}
void QPlaceSearchRequestPrivate::clear()
{
limit = -1;
- offset = 0;
searchTerm.clear();
categories.clear();
searchArea = QGeoShape();
@@ -429,27 +424,6 @@ void QPlaceSearchRequest::setLimit(int limit)
}
/*!
- Returns the offset index of the first item that is to be retrieved.
-
- The default offset is 0.
-*/
-int QPlaceSearchRequest::offset() const
-{
- Q_D(const QPlaceSearchRequest);
- return d->offset;
-}
-
-/*!
- Sets the starting index of the first item to be retrieved
- to \a offset.
-*/
-void QPlaceSearchRequest::setOffset(int offset)
-{
- Q_D(QPlaceSearchRequest);
- d->offset = offset;
-}
-
-/*!
Clears the search request.
*/
void QPlaceSearchRequest::clear()