diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-11-18 17:32:37 +0100 |
---|---|---|
committer | Michal Klocek <michal.klocek@theqtcompany.com> | 2015-11-23 14:05:12 +0000 |
commit | 65afb397635191666eb889364260edf0d8cd9024 (patch) | |
tree | e35500bbbde64fd6eb0093ff71fb0951d33d2fbb /src | |
parent | 608c17acaf124a9f6b83316e03a40b8d01fef92e (diff) | |
download | qtlocation-65afb397635191666eb889364260edf0d8cd9024.tar.gz |
Add missing handling of pathChanged to route map item
Done-with: Aaron McCarthy <aaron.mccarthy@jollamobile.com>
Change-Id: I016a30064e29872dfd199fdf09656f5358dbe604
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/location/qdeclarativeroutemapitem.cpp | 7 | ||||
-rw-r--r-- | src/imports/location/qdeclarativeroutemapitem_p.h | 3 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/imports/location/qdeclarativeroutemapitem.cpp b/src/imports/location/qdeclarativeroutemapitem.cpp index 78485cc0..19930cc3 100644 --- a/src/imports/location/qdeclarativeroutemapitem.cpp +++ b/src/imports/location/qdeclarativeroutemapitem.cpp @@ -119,12 +119,19 @@ void QDeclarativeRouteMapItem::setRoute(QDeclarativeGeoRoute *route) route_ = route; + connect(route_, SIGNAL(pathChanged()), this, SLOT(updateRoutePath())); + if (route_) setPathFromGeoList(route_->routePath()); emit routeChanged(route_); } +void QDeclarativeRouteMapItem::updateRoutePath() +{ + setPathFromGeoList(route_->routePath()); +} + /*! \internal void QDeclarativeRouteMapItem::setPath(const QJSValue &value) diff --git a/src/imports/location/qdeclarativeroutemapitem_p.h b/src/imports/location/qdeclarativeroutemapitem_p.h index 9bb3a443..3acac3cc 100644 --- a/src/imports/location/qdeclarativeroutemapitem_p.h +++ b/src/imports/location/qdeclarativeroutemapitem_p.h @@ -74,6 +74,9 @@ public: Q_SIGNALS: void routeChanged(const QDeclarativeGeoRoute *route); +private slots: + void updateRoutePath(); + protected: void setPath(const QJSValue &value) Q_DECL_OVERRIDE; |