summaryrefslogtreecommitdiff
path: root/src/location/labs/qdeclarativenavigator.cpp
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2018-12-04 17:30:02 +0100
committerPaolo Angelelli <paolo.angelelli@qt.io>2018-12-05 07:25:08 +0000
commit6de40d98a9f7c5402f211985e663ae1699e52e6f (patch)
treede87c9ad8cbe8d1ab818b0155756634737e49f1e /src/location/labs/qdeclarativenavigator.cpp
parent3d5b126091ca28e014d1fd3662244284498107c9 (diff)
downloadqtlocation-6de40d98a9f7c5402f211985e663ae1699e52e6f.tar.gz
Add QDeclarativeNavigator currentRouteLeg property
Somehow missing in the previous patch. Fixes: QTBUG-72281 Change-Id: Ic1bc24f0b241013048f5e02ede8332561212ffd0 Reviewed-by: Michael Brasser <michael.brasser@live.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Diffstat (limited to 'src/location/labs/qdeclarativenavigator.cpp')
-rw-r--r--src/location/labs/qdeclarativenavigator.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/location/labs/qdeclarativenavigator.cpp b/src/location/labs/qdeclarativenavigator.cpp
index a8cb788b..c95f360f 100644
--- a/src/location/labs/qdeclarativenavigator.cpp
+++ b/src/location/labs/qdeclarativenavigator.cpp
@@ -328,6 +328,13 @@ QDeclarativeGeoRoute *QDeclarativeNavigator::currentRoute() const
return d_ptr->m_currentRoute.data();
}
+QDeclarativeGeoRouteLeg *QDeclarativeNavigator::currentRouteLeg() const
+{
+ if (!d_ptr->m_ready || !d_ptr->m_navigator->active())
+ return nullptr;
+ return d_ptr->m_currentRouteLeg.data();
+}
+
int QDeclarativeNavigator::currentSegment() const
{
if (!d_ptr->m_ready || !d_ptr->m_navigator->active())