From 0aa7ae19eafebd0b146f9d97e04bd171c213dd76 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Mon, 15 Jan 2018 17:56:49 +0100 Subject: Add QDeclarativeGeoRoute::route getter To allow private classes to access the embedded QGeoRoute without the need to be friend. Change-Id: I7184e1a9fd038af3b82d71671667cd5b2e3449a7 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/location/declarativemaps/qdeclarativegeoroute.cpp | 5 +++++ src/location/declarativemaps/qdeclarativegeoroute_p.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/location/declarativemaps/qdeclarativegeoroute.cpp b/src/location/declarativemaps/qdeclarativegeoroute.cpp index 5540263c..aab59dc2 100644 --- a/src/location/declarativemaps/qdeclarativegeoroute.cpp +++ b/src/location/declarativemaps/qdeclarativegeoroute.cpp @@ -301,4 +301,9 @@ int QDeclarativeGeoRoute::segmentsCount() const return qMax(route_.d_ptr->segmentsCount(), segments_.count()); } +const QGeoRoute &QDeclarativeGeoRoute::route() const +{ + return route_; +} + QT_END_NAMESPACE diff --git a/src/location/declarativemaps/qdeclarativegeoroute_p.h b/src/location/declarativemaps/qdeclarativegeoroute_p.h index 738d2089..2be3d3f1 100644 --- a/src/location/declarativemaps/qdeclarativegeoroute_p.h +++ b/src/location/declarativemaps/qdeclarativegeoroute_p.h @@ -85,6 +85,7 @@ public: void clearSegments(); int segmentsCount() const; + const QGeoRoute &route() const; Q_SIGNALS: void pathChanged(); -- cgit v1.2.1