summaryrefslogtreecommitdiff
path: root/src/location/places
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
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')
-rw-r--r--src/location/places/qplacemanager.cpp1
-rw-r--r--src/location/places/qplacesearchrequest.cpp18
-rw-r--r--src/location/places/qplacesearchrequest.h3
-rw-r--r--src/location/places/qplacesearchresult.cpp38
-rw-r--r--src/location/places/qplacesearchresult.h6
-rw-r--r--src/location/places/qplacesearchresult_p.h1
6 files changed, 9 insertions, 58 deletions
diff --git a/src/location/places/qplacemanager.cpp b/src/location/places/qplacemanager.cpp
index 0dc9bf1b..56051e08 100644
--- a/src/location/places/qplacemanager.cpp
+++ b/src/location/places/qplacemanager.cpp
@@ -141,7 +141,6 @@ QT_BEGIN_NAMESPACE
\value RemoveCategoryFeature The manager can be used to remove categories.
\value RecommendationsFeature The manager can be used to provide recommendations.
\value SearchSuggestionsFeature The manager can be used to provide search term suggestions.
- \value CorrectionsFeature The manager can be used to provide search term corrections
\value LocaleFeature The manager can be used to provide place data localized
according to locale
\value NotificationsFeature The manager has signal notifications for when
diff --git a/src/location/places/qplacesearchrequest.cpp b/src/location/places/qplacesearchrequest.cpp
index ad654891..9a120e2f 100644
--- a/src/location/places/qplacesearchrequest.cpp
+++ b/src/location/places/qplacesearchrequest.cpp
@@ -313,24 +313,6 @@ void QPlaceSearchRequest::setSearchArea(const QGeoBoundingArea &area)
}
/*!
- Returns the maximum number of search term corrections that may be returned.
-*/
-int QPlaceSearchRequest::maximumCorrections() const
-{
- Q_D(const QPlaceSearchRequest);
- return d->dymNumber;
-}
-
-/*!
- Sets maximum \a number of search term corrections that may be returned.
-*/
-void QPlaceSearchRequest::setMaximumCorrections(int number)
-{
- Q_D(QPlaceSearchRequest);
- d->dymNumber = number;
-}
-
-/*!
Returns the visibility scope used when searching for places. The default value is
QtLocation::UnspecifiedVisibility meaning that no explicit scope has been assigned.
Places of any scope may be returned during the search.
diff --git a/src/location/places/qplacesearchrequest.h b/src/location/places/qplacesearchrequest.h
index 256d3df9..32639519 100644
--- a/src/location/places/qplacesearchrequest.h
+++ b/src/location/places/qplacesearchrequest.h
@@ -86,9 +86,6 @@ public:
QGeoBoundingArea searchArea() const;
void setSearchArea(const QGeoBoundingArea &area);
- int maximumCorrections() const;
- void setMaximumCorrections(int number);
-
QtLocation::VisibilityScope visibilityScope() const;
void setVisibilityScope(QtLocation::VisibilityScope visibilityScopes);
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()
diff --git a/src/location/places/qplacesearchresult.h b/src/location/places/qplacesearchresult.h
index 132599cc..52d0bfd0 100644
--- a/src/location/places/qplacesearchresult.h
+++ b/src/location/places/qplacesearchresult.h
@@ -72,8 +72,7 @@ public:
enum SearchResultType {
UnknownSearchResult = 0,
- PlaceResult,
- CorrectionResult
+ PlaceResult
};
qreal distance() const;
@@ -85,9 +84,6 @@ public:
QPlace place() const;
void setPlace(const QPlace &place);
- QString correction() const;
- void setCorrection(const QString &correction);
-
bool isSponsored() const;
void setSponsored(bool sponsored);
diff --git a/src/location/places/qplacesearchresult_p.h b/src/location/places/qplacesearchresult_p.h
index 05e96e69..1a9b80e0 100644
--- a/src/location/places/qplacesearchresult_p.h
+++ b/src/location/places/qplacesearchresult_p.h
@@ -61,7 +61,6 @@ public:
qreal distance;
QPlaceSearchResult::SearchResultType type;
QPlace place;
- QString correction;
bool sponsored;
};