From f44645b6fe3de4d117fe85d1f2ae7a01ac34b252 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Mon, 17 Jul 2017 22:36:55 +0300 Subject: maplocationmodel: store the coordinate as QGeoCoordinate Instead of maintaining a seperate latitude/longitude values in C++ and passing them to QML separatelly, pass them as a QGeoCoordinate. This reduces the number of model "roles" and also prevents the creations of extra objects in QML (e.g. via QtPositioning.coordinate(..)). Signed-off-by: Lubomir I. Ivanov --- mobile-widgets/qml/MapWidget.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mobile-widgets/qml') diff --git a/mobile-widgets/qml/MapWidget.qml b/mobile-widgets/qml/MapWidget.qml index c64fd5f77..5fe941792 100644 --- a/mobile-widgets/qml/MapWidget.qml +++ b/mobile-widgets/qml/MapWidget.qml @@ -37,7 +37,7 @@ Item { delegate: MapQuickItem { anchorPoint.x: 0 anchorPoint.y: mapItemImage.height - coordinate: QtPositioning.coordinate(latitude, longitude) + coordinate: model.coordinate sourceItem: Image { id: mapItemImage; source: "qrc:///mapwidget-marker-image" } } } -- cgit v1.2.3-70-g09d2