summaryrefslogtreecommitdiff
path: root/src/imports/location/declarativeplaces
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports/location/declarativeplaces')
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp37
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h9
2 files changed, 1 insertions, 45 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
index c52fd06c..b51b7121 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
@@ -97,11 +97,6 @@ QT_USE_NAMESPACE
\li bool
\li Valid only when the \c type role is \c PlaceResult, true if the search result is a
sponsored result.
- \row
- \li correction
- \li string
- \li Valid only when the \c type role is \c CorrectionResult, a suggested correction to
- the search term.
\endtable
\section2 Search Result Types
@@ -113,9 +108,6 @@ QT_USE_NAMESPACE
\li PlaceSearchModel.PlaceResult
\li The search result contains a place.
\row
- \li PlaceSearchModel.CorrectionResult
- \li The search result contains a search term correction.
- \row
\li PlaceSearchModel.UnknownSearchResult
\li The contents of the search result are unknown.
\endtable
@@ -158,13 +150,6 @@ QT_USE_NAMESPACE
support a means to retrieve the total number of items available from the
backed. Also note that support for \l offset and \l limit can vary
according to the \l plugin.
-
- \section1 Corrections
- The PlaceSearchModel can return correction results if supported by the \l plugin.
- Correction results consist of a string which can be used as a search term for another query and
- are often used in the context of "Did you mean" corrections. The \l maximumCorrections property
- can be used to limit the maximum number of search term correction results that may be returned.
- Setting \l maximumCorrections to 0 will prevent any search term correction results from being returned.
*/
/*!
@@ -447,25 +432,6 @@ void QDeclarativeSearchResultModel::setRelevanceHint(QDeclarativeSearchResultMod
}
/*!
- \qmlproperty int PlaceSearchModel::maximumCorrections
-
- This property holds the maximum number of search term corrections that may be returned.
-*/
-int QDeclarativeSearchResultModel::maximumCorrections() const
-{
- return m_request.maximumCorrections();
-}
-
-void QDeclarativeSearchResultModel::setMaximumCorrections(int corrections)
-{
- if (m_request.maximumCorrections() == corrections)
- return;
-
- m_request.setMaximumCorrections(corrections);
- emit maximumCorrectionsChanged();
-}
-
-/*!
\qmlproperty enum PlaceSearchModel::visibilityScope
This property holds the visibility scope of the places to search. Only places with the
@@ -513,8 +479,6 @@ QVariant QDeclarativeSearchResultModel::data(const QModelIndex &index, int role)
switch (role) {
case SearchResultTypeRole:
return m_results.at(index.row()).type();
- case CorrectionRole:
- return m_results.at(index.row()).correction();
case SponsoredRole:
return m_results.at(index.row()).isSponsored();
default:
@@ -526,7 +490,6 @@ QHash<int, QByteArray> QDeclarativeSearchResultModel::roleNames() const
{
QHash<int, QByteArray> roles = QDeclarativeResultModelBase::roleNames();
roles.insert(SearchResultTypeRole, "type");
- roles.insert(CorrectionRole, "correction");
roles.insert(SponsoredRole, "sponsored");
return roles;
}
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
index 160223ef..a5476f68 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
@@ -56,7 +56,6 @@ class QDeclarativeSearchResultModel : public QDeclarativeResultModelBase
Q_PROPERTY(QString searchTerm READ searchTerm WRITE setSearchTerm NOTIFY searchTermChanged)
Q_PROPERTY(QQmlListProperty<QDeclarativeCategory> categories READ categories NOTIFY categoriesChanged)
- Q_PROPERTY(int maximumCorrections READ maximumCorrections WRITE setMaximumCorrections NOTIFY maximumCorrectionsChanged)
Q_PROPERTY(RelevanceHint relevanceHint READ relevanceHint WRITE setRelevanceHint NOTIFY relevanceHintChanged)
Q_PROPERTY(QDeclarativePlace::Visibility visibilityScope READ visibilityScope WRITE setVisibilityScope NOTIFY visibilityScopeChanged)
@@ -65,8 +64,7 @@ class QDeclarativeSearchResultModel : public QDeclarativeResultModelBase
public:
enum SearchResultType {
UnknownSearchResult = QPlaceSearchResult::UnknownSearchResult,
- PlaceResult = QPlaceSearchResult::PlaceResult,
- CorrectionResult = QPlaceSearchResult::CorrectionResult
+ PlaceResult = QPlaceSearchResult::PlaceResult
};
enum RelevanceHint {
@@ -91,9 +89,6 @@ public:
QDeclarativeSearchResultModel::RelevanceHint relevanceHint() const;
void setRelevanceHint(QDeclarativeSearchResultModel::RelevanceHint hint);
- int maximumCorrections() const;
- void setMaximumCorrections(int corrections);
-
QDeclarativePlace::Visibility visibilityScope() const;
void setVisibilityScope(QDeclarativePlace::Visibility visibilityScope);
@@ -103,7 +98,6 @@ public:
Q_SIGNALS:
void searchTermChanged();
void categoriesChanged();
- void maximumCorrectionsChanged();
void relevanceHintChanged();
void visibilityScopeChanged();
@@ -118,7 +112,6 @@ private Q_SLOTS:
private:
enum Roles {
SearchResultTypeRole = QDeclarativeResultModelBase::PlaceRole + 1,
- CorrectionRole,
SponsoredRole
};