summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabcd <qt-info@nokia.com>2011-09-12 16:14:32 +1000
committerQt by Nokia <qt-info@nokia.com>2011-09-23 05:32:32 +0200
commit633fdc73289157e0b7cbfaef3a3d1aba1a1472e7 (patch)
tree0e7d61e765d68bd2d04d9a0c8869bf5d78ab8ed7
parent5841ce6aeff5e01febc0d44b0eea0b371fb19ed8 (diff)
downloadqtlocation-633fdc73289157e0b7cbfaef3a3d1aba1a1472e7.tar.gz
Remove MatchType
The MatchType is not provided by the REST API Change-Id: If1149b1e0b934dde90468dacaabe82ee11995295 Reviewed-on: http://codereview.qt-project.org/5211 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp7
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h9
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp7
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h9
-rw-r--r--src/location/places/qplacesearchresult.cpp19
-rw-r--r--src/location/places/qplacesearchresult.h9
-rw-r--r--src/location/places/qplacesearchresult_p.h1
7 files changed, 2 insertions, 59 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
index 4b92a1eb..1834bde5 100644
--- a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
@@ -43,10 +43,6 @@ QT_USE_NAMESPACE
\o real
\o The heading to the place.
\row
- \o matchType
- \o RecommendationModel.LocationMatchType
- \o The location match type of the result.
- \row
\o additionalData
\o
\o Additional data related to the search result.
@@ -150,7 +146,6 @@ QDeclarativeRecommendationModel::QDeclarativeRecommendationModel(QObject *parent
roleNames.insert(SearchResultRelevance, "relevance");
roleNames.insert(SearchResultDistance, "distance");
roleNames.insert(SearchResultHeading, "heading");
- roleNames.insert(SearchResultMatchType, "matchType");
roleNames.insert(SearchResultAdditionalData, "additionalData");
roleNames.insert(SearchResultPlace, "place");
roleNames.insert(SearchResultDidYouMean, "didYouMean");
@@ -234,8 +229,6 @@ QVariant QDeclarativeRecommendationModel::data(const QModelIndex& index, int rol
return result.distance();
case SearchResultHeading:
return result.heading();
- case SearchResultMatchType:
- return result.matchType();
case SearchResultAdditionalData:
return result.additionalData();
case SearchResultPlace:
diff --git a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h
index c2ceba08..117d35a8 100644
--- a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel_p.h
@@ -52,7 +52,7 @@ class QDeclarativeRecommendationModel : public QDeclarativeSearchModelBase
Q_PROPERTY(QString placeId READ placeId WRITE setPlaceId NOTIFY placeIdChanged)
- Q_ENUMS(SearchResultType LocationMatchType)
+ Q_ENUMS(SearchResultType)
Q_INTERFACES(QDeclarativeParserStatus)
@@ -63,12 +63,6 @@ public:
UnknownSearchResult = QPlaceSearchResult::UnknownSearchResult
};
- enum LocationMatchType {
- PointAddress = QPlaceSearchResult::PointAddress,
- Interpolated = QPlaceSearchResult::Interpolated,
- UndefinedLocationMatch = QPlaceSearchResult::UndefinedLocationMatch
- };
-
explicit QDeclarativeRecommendationModel(QObject *parent = 0);
~QDeclarativeRecommendationModel();
@@ -87,7 +81,6 @@ public:
SearchResultRelevance,
SearchResultDistance,
SearchResultHeading,
- SearchResultMatchType,
SearchResultAdditionalData,
SearchResultPlace,
SearchResultDidYouMean
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
index cf1c6e11..2c052070 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel.cpp
@@ -47,10 +47,6 @@ QT_USE_NAMESPACE
\o real
\o The heading to the place.
\row
- \o matchType
- \o SearchResultModel.LocationMatchType
- \o The location match type of the result.
- \row
\o additionalData
\o
\o Additional data related to the search result.
@@ -146,7 +142,6 @@ QDeclarativeSearchResultModel::QDeclarativeSearchResultModel(QObject *parent)
roleNames.insert(SearchResultRelevance, "relevance");
roleNames.insert(SearchResultDistance, "distance");
roleNames.insert(SearchResultHeading, "heading");
- roleNames.insert(SearchResultMatchType, "matchType");
roleNames.insert(SearchResultAdditionalData, "additionalData");
roleNames.insert(SearchResultPlace, "place");
roleNames.insert(SearchResultDidYouMean, "didYouMean");
@@ -302,8 +297,6 @@ QVariant QDeclarativeSearchResultModel::data(const QModelIndex &index, int role)
return result.distance();
case SearchResultHeading:
return result.heading();
- case SearchResultMatchType:
- return result.matchType();
case SearchResultAdditionalData:
return result.additionalData();
case SearchResultPlace:
diff --git a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
index 90a0da2f..14b8b96d 100644
--- a/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativesearchresultmodel_p.h
@@ -57,7 +57,7 @@ class QDeclarativeSearchResultModel : public QDeclarativeSearchModelBase
Q_PROPERTY(QDeclarativeCategory *searchCategory READ searchCategory WRITE setSearchCategory NOTIFY searchCategoryChanged)
Q_PROPERTY(int didYouMean READ didYouMean WRITE setDidYouMean NOTIFY didYouMeanChanged);
- Q_ENUMS(SearchResultType LocationMatchType)
+ Q_ENUMS(SearchResultType)
public:
enum SearchResultType {
@@ -66,12 +66,6 @@ public:
UnknownSearchResult = QPlaceSearchResult::UnknownSearchResult
};
- enum LocationMatchType {
- PointAddress = QPlaceSearchResult::PointAddress,
- Interpolated = QPlaceSearchResult::Interpolated,
- UndefinedLocationMatch = QPlaceSearchResult::UndefinedLocationMatch
- };
-
explicit QDeclarativeSearchResultModel(QObject *parent = 0);
~QDeclarativeSearchResultModel();
@@ -98,7 +92,6 @@ public:
SearchResultRelevance,
SearchResultDistance,
SearchResultHeading,
- SearchResultMatchType,
SearchResultAdditionalData,
SearchResultPlace,
SearchResultDidYouMean
diff --git a/src/location/places/qplacesearchresult.cpp b/src/location/places/qplacesearchresult.cpp
index aa2d2a23..f72ba798 100644
--- a/src/location/places/qplacesearchresult.cpp
+++ b/src/location/places/qplacesearchresult.cpp
@@ -49,7 +49,6 @@ QPlaceSearchResultPrivate::QPlaceSearchResultPrivate()
relevance(0),
distance(0),
heading(0),
- matchType(QPlaceSearchResult::UndefinedLocationMatch),
type(QPlaceSearchResult::UnknownSearchResult)
{
}
@@ -61,7 +60,6 @@ QPlaceSearchResultPrivate::QPlaceSearchResultPrivate(const QPlaceSearchResultPri
this->relevance = other.relevance;
this->distance = other.distance;
this->heading = other.heading;
- this->matchType = other.matchType;
this->type = other.type;
this->place = other.place;
this->dymString = other.dymString;
@@ -78,7 +76,6 @@ bool QPlaceSearchResultPrivate::operator==(const QPlaceSearchResultPrivate &othe
&& this->relevance == other.relevance
&& this->distance == other.distance
&& this->heading == other.heading
- && this->matchType == other.matchType
&& this->type == other.type
&& this->place == other.place
&& this->dymString == other.dymString
@@ -180,22 +177,6 @@ void QPlaceSearchResult::setHeading(const qreal &heading)
}
/*!
- Returns location match type.
-*/
-QPlaceSearchResult::LocationMatchType QPlaceSearchResult::matchType() const
-{
- return d->matchType;
-}
-
-/*!
- Sets the location \a matchType.
-*/
-void QPlaceSearchResult::setMatchType(const QPlaceSearchResult::LocationMatchType &matchType)
-{
- d->matchType = matchType;
-}
-
-/*!
Returns additional data.
*/
QVariantHash QPlaceSearchResult::additionalData() const
diff --git a/src/location/places/qplacesearchresult.h b/src/location/places/qplacesearchresult.h
index 5bc9f8ad..d2bd44d1 100644
--- a/src/location/places/qplacesearchresult.h
+++ b/src/location/places/qplacesearchresult.h
@@ -68,12 +68,6 @@ public:
return !(other == *this);
}
- enum LocationMatchType {
- PointAddress,
- Interpolated,
- UndefinedLocationMatch
- };
-
enum SearchResultType {
Place,
DidYouMeanSuggestion,
@@ -89,9 +83,6 @@ public:
qreal heading() const;
void setHeading(const qreal &heading);
- LocationMatchType matchType() const;
- void setMatchType(const LocationMatchType &matchType);
-
QVariantHash additionalData() const;
void setAdditionalData(const QVariantHash &data);
diff --git a/src/location/places/qplacesearchresult_p.h b/src/location/places/qplacesearchresult_p.h
index 106c2fc7..9fc5cc42 100644
--- a/src/location/places/qplacesearchresult_p.h
+++ b/src/location/places/qplacesearchresult_p.h
@@ -61,7 +61,6 @@ public:
qreal relevance;
qreal distance;
qreal heading;
- QPlaceSearchResult::LocationMatchType matchType;
QVariantHash additionalData;
QPlaceSearchResult::SearchResultType type;
QPlace place;