diff options
Diffstat (limited to 'src/location/declarativemaps/locationvaluetypehelper.cpp')
-rw-r--r-- | src/location/declarativemaps/locationvaluetypehelper.cpp | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/src/location/declarativemaps/locationvaluetypehelper.cpp b/src/location/declarativemaps/locationvaluetypehelper.cpp index f2029aa1..f5a3a556 100644 --- a/src/location/declarativemaps/locationvaluetypehelper.cpp +++ b/src/location/declarativemaps/locationvaluetypehelper.cpp @@ -53,6 +53,8 @@ QT_BEGIN_NAMESPACE +namespace { + QGeoCoordinate parseCoordinate(const QJSValue &value, bool *ok) { QGeoCoordinate c; @@ -74,6 +76,8 @@ QGeoCoordinate parseCoordinate(const QJSValue &value, bool *ok) return c; } +} // anonymous namespace + QGeoCoordinate parseCoordinate(const QVariant &value, bool *ok) { QGeoCoordinate c; @@ -142,25 +146,6 @@ QGeoRectangle parseRectangle(const QJSValue &value, bool *ok) return r; } -QGeoCircle parseCircle(const QJSValue &value, bool *ok) -{ - QGeoCircle c; - - *ok = false; - - if (value.isObject()) { - if (value.hasProperty(QStringLiteral("center"))) { - QGeoCoordinate coord = parseCoordinate(value.property(QStringLiteral("center")), ok); - if (*ok) - c.setCenter(coord); - } - if (value.hasProperty(QStringLiteral("radius"))) - c.setRadius(value.property(QStringLiteral("radius")).toNumber()); - } - - return c; -} - QJSValue fromList(const QObject *object, const QList<QGeoCoordinate> &list) { QQmlContext *context = QQmlEngine::contextForObject(object); |