summaryrefslogtreecommitdiff
path: root/src/location/places/qplacesearchresult.cpp
diff options
context:
space:
mode:
authorabcd <amos.choy@nokia.com>2012-06-13 19:07:27 +1000
committerQt by Nokia <qt-info@nokia.com>2012-06-14 05:14:26 +0200
commit53e64c5ddc4fec4bdb0d66410808c8b3b90c90c5 (patch)
treea7581c7b43e97829d8a7cc6ab40bbb1d3f4d9438 /src/location/places/qplacesearchresult.cpp
parent1428c9b43901b7f8ecf0ebc8c19f5fb15e2058b1 (diff)
downloadqtlocation-53e64c5ddc4fec4bdb0d66410808c8b3b90c90c5.tar.gz
Remove corrections
The new REST server doesn't support did you mean corrections. This combined with the fact that a more generic solution to provide corrections is intended to be provided later on means that it is not worthwhile providing corrections as they are currently implemented, they will soon be deprecated anyway. Change-Id: I674aba99dc3cdc0eb0fc48d928a2146f5e792a2f Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/places/qplacesearchresult.cpp')
-rw-r--r--src/location/places/qplacesearchresult.cpp38
1 files changed, 8 insertions, 30 deletions
diff --git a/src/location/places/qplacesearchresult.cpp b/src/location/places/qplacesearchresult.cpp
index 0feb8f74..88550871 100644
--- a/src/location/places/qplacesearchresult.cpp
+++ b/src/location/places/qplacesearchresult.cpp
@@ -57,7 +57,6 @@ QPlaceSearchResultPrivate::QPlaceSearchResultPrivate(const QPlaceSearchResultPri
distance = other.distance;
type = other.type;
place = other.place;
- correction = other.correction;
sponsored = other.sponsored;
}
@@ -70,7 +69,6 @@ bool QPlaceSearchResultPrivate::operator==(const QPlaceSearchResultPrivate &othe
return distance == other.distance &&
type == other.type &&
place == other.place &&
- correction == other.correction &&
sponsored == other.sponsored;
}
@@ -83,23 +81,20 @@ bool QPlaceSearchResultPrivate::operator==(const QPlaceSearchResultPrivate &othe
\brief The QPlaceSearchResult class represents a search result.
- There are two types of search results. The first is a
- \l {QPlaceSearchResult::PlaceResult} {place result}, which contains
- a place that matched the search request, but also metadata about the place
- such as the distance from the search center of a search request and whether the result is a
- sponsored or \l {http://en.wikipedia.org/wiki/Organic_search}{organic} search result.
-
- The other type is a \l {QPlaceSearchResult::CorrectionResult}{correction}, which
- contains an alternative search term that may better reflect the
- user's intended query.
-
+ Currently the only useful search result type is the
+ \l {QPlaceSearchResult::PlaceResult} {place result}.
+ For search results of this type, the \l {QPlaceSearchResult::distance()} {distance},
+ \l {QPlaceSearchResult::place()}{place} and {QPlaceSearchResult::isSponsored} isSponsored
+ fields of the search result is filled in. Thus the result contains the distance
+ from the place from the search center of the search request, the place data containing
+ coordinates, address and so on, and finally an indication of whether the
+ result is sponsored or \l {http://en.wikipedia.org/wiki/Organic_search}{organic}.
*/
/*!
\enum QPlaceSearchResult::SearchResultType
Defines the type of search result
\value PlaceResult The search result contains a place.
- \value CorrectionResult The search result contains a search term correction.
\value UnknownSearchResult The contents of the search result are unknown.
*/
@@ -208,23 +203,6 @@ void QPlaceSearchResult::setPlace(const QPlace &place)
}
/*!
- Returns the correction term that this particular search result represents.
- This field is only valid when the search result type is QPlaceSearchResult::CorrectionResult.
-*/
-QString QPlaceSearchResult::correction() const
-{
- return d->correction;
-}
-
-/*!
- Sets the \a correction term of the search result.
-*/
-void QPlaceSearchResult::setCorrection(const QString &correction)
-{
- d->correction = correction;
-}
-
-/*!
Returns true if the search result represents a sponsored result.
\sa setSponsored()