summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2022-10-08 15:19:05 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-01-13 09:08:55 +0000
commitd4c6d9e735a5473d2e2b33a6acfa8a3a5ae30363 (patch)
tree8ea81ee746afc5264e63c0c46d42c6abcf1cba88
parent23e9f3b9baca3b41b70d636867469215a2fc5984 (diff)
downloadqtlocation-d4c6d9e735a5473d2e2b33a6acfa8a3a5ae30363.tar.gz
Remove unused extraParameters
No plugin implements or uses it, and we could use dynamic properties to pass more data through to backend implementations, if needed. Change-Id: Ie7cbc1e24fadf51e5f39e0ced53860e6a2c6609b Reviewed-by: Alex Blasche <alexander.blasche@qt.io> (cherry picked from commit 6ea8dcf6b9dda083f46c0cb67ca493bd8b6363cd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel.cpp16
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel_p.h3
-rw-r--r--src/location/maps/qgeorouterequest.cpp24
-rw-r--r--src/location/maps/qgeorouterequest.h3
-rw-r--r--src/location/maps/qgeorouterequest_p.h1
-rw-r--r--tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h2
-rw-r--r--tests/auto/qgeorouterequest/tst_qgeorouterequest.cpp32
-rw-r--r--tests/auto/qgeorouterequest/tst_qgeorouterequest.h2
8 files changed, 1 insertions, 82 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
index 53b791fe..78c4b5e3 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
@@ -1283,22 +1283,6 @@ QGeoRouteRequest QDeclarativeGeoRouteQuery::routeRequest() const
return request_;
}
-
-/*!
- \qmlproperty VariantMap RouteQuery::extraParameters
- \readonly
-
- The route query extra parameters. This property is read only. If the query is
- defined by the user, these can be set by using MapParameters.
- If the route query comes from the engine via signals, the query is intended to be read-only.
-
- \since 5.11
-*/
-QVariantMap QDeclarativeGeoRouteQuery::extraParameters() const
-{
- return routeRequest().extraParameters();
-}
-
void QDeclarativeGeoRouteQuery::excludedAreaCoordinateChanged()
{
if (!m_excludedAreaCoordinateChanged) {
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
index 1e753217..99051bfd 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel_p.h
@@ -211,7 +211,6 @@ class Q_LOCATION_PRIVATE_EXPORT QDeclarativeGeoRouteQuery : public QObject, publ
Q_PROPERTY(QList<QGeoCoordinate> waypoints READ waypoints WRITE setWaypoints NOTIFY waypointsChanged)
Q_PROPERTY(QList<QGeoRectangle> excludedAreas READ excludedAreas WRITE setExcludedAreas NOTIFY excludedAreasChanged)
Q_PROPERTY(QList<int> featureTypes READ featureTypes NOTIFY featureTypesChanged)
- Q_PROPERTY(QVariantMap extraParameters READ extraParameters REVISION(5, 11))
Q_PROPERTY(QDateTime departureTime READ departureTime WRITE setDepartureTime NOTIFY departureTimeChanged REVISION(5, 13))
Q_INTERFACES(QQmlParserStatus)
@@ -226,7 +225,6 @@ public:
void componentComplete() override;
QGeoRouteRequest routeRequest() const;
- QVariantMap extraParameters() const;
enum TravelMode {
CarTravel = QGeoRouteRequest::CarTravel,
@@ -337,7 +335,6 @@ Q_SIGNALS:
void segmentDetailChanged();
void queryDetailsChanged();
- Q_REVISION(11) void extraParametersChanged();
void departureTimeChanged();
private Q_SLOTS:
diff --git a/src/location/maps/qgeorouterequest.cpp b/src/location/maps/qgeorouterequest.cpp
index 2f574809..08184592 100644
--- a/src/location/maps/qgeorouterequest.cpp
+++ b/src/location/maps/qgeorouterequest.cpp
@@ -479,27 +479,6 @@ QDateTime QGeoRouteRequest::departureTime() const
return d_ptr->departureTime;
}
-/*!
- Sets the extra parameters \a extraParameters for the route request.
- The format of the extra parameters is plugin specific, and documented per plugin.
-
- \since 5.11
-*/
-void QGeoRouteRequest::setExtraParameters(const QVariantMap &extraParameters)
-{
- d_ptr->extraParameters = extraParameters;
-}
-
-/*!
- Returns the extra parameters set for this route request.
-
- \since 5.11
-*/
-QVariantMap QGeoRouteRequest::extraParameters() const
-{
- return d_ptr->extraParameters;
-}
-
/*******************************************************************************
*******************************************************************************/
@@ -512,8 +491,7 @@ bool QGeoRouteRequestPrivate::operator==(const QGeoRouteRequestPrivate &other) c
&& (featureWeights == other.featureWeights)
&& (routeOptimization == other.routeOptimization)
&& (segmentDetail == other.segmentDetail)
- && (maneuverDetail == other.maneuverDetail)
- && (extraParameters == other.extraParameters));
+ && (maneuverDetail == other.maneuverDetail));
}
QT_END_NAMESPACE
diff --git a/src/location/maps/qgeorouterequest.h b/src/location/maps/qgeorouterequest.h
index 45b0bc52..fa0a740f 100644
--- a/src/location/maps/qgeorouterequest.h
+++ b/src/location/maps/qgeorouterequest.h
@@ -166,9 +166,6 @@ public:
void setDepartureTime(const QDateTime &departureTime);
QDateTime departureTime() const;
- void setExtraParameters(const QVariantMap &extraParameters);
- QVariantMap extraParameters() const;
-
private:
QExplicitlySharedDataPointer<QGeoRouteRequestPrivate> d_ptr;
diff --git a/src/location/maps/qgeorouterequest_p.h b/src/location/maps/qgeorouterequest_p.h
index b74283fc..369d9e32 100644
--- a/src/location/maps/qgeorouterequest_p.h
+++ b/src/location/maps/qgeorouterequest_p.h
@@ -76,7 +76,6 @@ public:
QGeoRouteRequest::SegmentDetail segmentDetail = QGeoRouteRequest::BasicSegmentData;
QGeoRouteRequest::ManeuverDetail maneuverDetail = QGeoRouteRequest::BasicManeuvers;
QDateTime departureTime;
- QVariantMap extraParameters;
};
QT_END_NAMESPACE
diff --git a/tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h b/tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h
index 59cd8585..8ef0fd4c 100644
--- a/tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h
+++ b/tests/auto/geotestplugin/qgeoroutingmanagerengine_test.h
@@ -141,8 +141,6 @@ public:
{
QList<QGeoRoute> routes;
int travelTime = 0;
- if (request.extraParameters().contains("test-traveltime"))
- travelTime = request.extraParameters().value("test-traveltime").toMap().value("requestedTime").toInt();
for (int i = 0; i < request.numberAlternativeRoutes(); ++i) {
QGeoRoute route;
diff --git a/tests/auto/qgeorouterequest/tst_qgeorouterequest.cpp b/tests/auto/qgeorouterequest/tst_qgeorouterequest.cpp
index 382bce56..1b35217b 100644
--- a/tests/auto/qgeorouterequest/tst_qgeorouterequest.cpp
+++ b/tests/auto/qgeorouterequest/tst_qgeorouterequest.cpp
@@ -280,38 +280,6 @@ void tst_QGeoRouteRequest::featureWeight()
QVERIFY(qgeorouterequest.featureTypes().contains(type));
}
-void tst_QGeoRouteRequest::extraParameters_data()
-{
- QTest::addColumn<QVariantMap>("extraParameters");
-
- QVariantMap params;
- QTest::newRow("Empty") << params;
-
- const QVariantMap param1 = {{"property1", QVariant(42)} , {"property2", QVariant("42")} , {"property3", QVariant("42.0")}};
- params["param1"] = param1;
-
- QTest::newRow("One param") << params;
-
- const QVariantMap param2 = {{"property1", QVariant(43)} , {"property2", QVariant("43")} , {"property3", QVariant("43.0")}};
- params["param2"] = param2;
-
- QTest::newRow("Two params") << params;
-}
-
-void tst_QGeoRouteRequest::extraParameters()
-{
- typedef QVariantMap ParameterType;
- QFETCH(ParameterType , extraParameters);
-
- QGeoRouteRequest qgeorouterequest;
-
- QVariantMap emptyParams;
- qgeorouterequest.setExtraParameters(extraParameters);
- QCOMPARE(qgeorouterequest.extraParameters(), extraParameters);
- qgeorouterequest.setExtraParameters(emptyParams);
- QCOMPARE(qgeorouterequest.extraParameters(), emptyParams);
-}
-
void tst_QGeoRouteRequest::departureTime_data()
{
QTest::addColumn<QDateTime>("departureTime");
diff --git a/tests/auto/qgeorouterequest/tst_qgeorouterequest.h b/tests/auto/qgeorouterequest/tst_qgeorouterequest.h
index 4bae1b0d..a06417d4 100644
--- a/tests/auto/qgeorouterequest/tst_qgeorouterequest.h
+++ b/tests/auto/qgeorouterequest/tst_qgeorouterequest.h
@@ -66,8 +66,6 @@ private Q_SLOTS:
void maneuverDetail_data();
void featureWeight();
void featureWeight_data();
- void extraParameters();
- void extraParameters_data();
void departureTime();
void departureTime_data();
//End Unit Test for QGeoRouteRequest