From 476670cb8da0b0e4823e95a3eecdae40e7402811 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 17 Jul 2017 23:13:31 +0300 Subject: mapwidgethelper: pass a QGeoCoordinate to the QML map Rename the QML function "centerOnCoordinates" to "centerOnCoordinate" and pass a QGeoCoordinate to it in ::centerOnDiveSite(). This will prevent the creation of a QGeoCoordinate object on the QML side and instead it will be created in C++. Signed-off-by: Lubomir I. Ivanov --- mobile-widgets/qml/MapWidget.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index 5fe941792..ce057d63e 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -60,8 +60,8 @@ Item { } } - function centerOnCoordinates(latitude, longitude) { - map.newCenter = QtPositioning.coordinate(latitude, longitude); + function centerOnCoordinate(coordinate) { + map.newCenter = coordinate; map.zoomLevel = 2; mapAnimation.restart(); } -- cgit v1.2.3-70-g09d2