summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-07-03 15:02:59 +0200
committerLars Knoll <lars.knoll@qt.io>2018-08-03 06:06:18 +0000
commitcabf40ba4a897032b1e16b92147e1050c77f6fef (patch)
tree7ad6e8cb59d5a094275b825b51861aa90f70dbfc
parent0e9d2d99742c92b049ec025f7ca3a333abd0de82 (diff)
downloadqtlocation-cabf40ba4a897032b1e16b92147e1050c77f6fef.tar.gz
Remove usage of deprecated, internal QML API
Change-Id: I4c9a27532f96a885d8baa7a790b2b983b2eb3bb3 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--src/location/declarativemaps/locationvaluetypehelper.cpp4
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroute.cpp4
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutemodel.cpp4
-rw-r--r--src/location/declarativemaps/qdeclarativegeoroutesegment.cpp4
4 files changed, 0 insertions, 16 deletions
diff --git a/src/location/declarativemaps/locationvaluetypehelper.cpp b/src/location/declarativemaps/locationvaluetypehelper.cpp
index 4f95e40d..8c96c8e7 100644
--- a/src/location/declarativemaps/locationvaluetypehelper.cpp
+++ b/src/location/declarativemaps/locationvaluetypehelper.cpp
@@ -159,11 +159,7 @@ QJSValue fromList(const QObject *object, const QList<QGeoCoordinate> &list)
int i = 0;
for (const auto &val : list) {
QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(val)));
-#if Q_QML_PRIVATE_API_VERSION >= 2
pathArray->put(i++, cv);
-#else
- pathArray->putIndexed(i++, cv);
-#endif
}
return QJSValue(v4, pathArray.asReturnedValue());
diff --git a/src/location/declarativemaps/qdeclarativegeoroute.cpp b/src/location/declarativemaps/qdeclarativegeoroute.cpp
index dc2fd737..8eeb549a 100644
--- a/src/location/declarativemaps/qdeclarativegeoroute.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroute.cpp
@@ -182,11 +182,7 @@ QJSValue QDeclarativeGeoRoute::path() const
const QGeoCoordinate &c = route_.path().at(i);
QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(c)));
-#if Q_QML_PRIVATE_API_VERSION >= 2
pathArray->put(i, cv);
-#else
- pathArray->putIndexed(i, cv);
-#endif
}
return QJSValue(v4, pathArray.asReturnedValue());
diff --git a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
index 06e15769..20ccfdd2 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroutemodel.cpp
@@ -952,11 +952,7 @@ QJSValue QDeclarativeGeoRouteQuery::excludedAreas() const
const QGeoRectangle &r = request_.excludeAreas().at(i);
QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(r)));
-#if Q_QML_PRIVATE_API_VERSION >= 2
excludedAreasArray->put(i, cv);
-#else
- excludedAreasArray->putIndexed(i, cv);
-#endif
}
return QJSValue(v4, excludedAreasArray.asReturnedValue());
diff --git a/src/location/declarativemaps/qdeclarativegeoroutesegment.cpp b/src/location/declarativemaps/qdeclarativegeoroutesegment.cpp
index 15065adc..b0e05f32 100644
--- a/src/location/declarativemaps/qdeclarativegeoroutesegment.cpp
+++ b/src/location/declarativemaps/qdeclarativegeoroutesegment.cpp
@@ -153,11 +153,7 @@ QJSValue QDeclarativeGeoRouteSegment::path() const
const QGeoCoordinate &c = segment_.path().at(i);
QV4::ScopedValue cv(scope, v4->fromVariant(QVariant::fromValue(c)));
-#if Q_QML_PRIVATE_API_VERSION >= 2
pathArray->put(i, cv);
-#else
- pathArray->putIndexed(i, cv);
-#endif
}
return QJSValue(v4, pathArray.asReturnedValue());