From d61a9ddc13a4fca19dbbf35ef9b607c6d676a4b2 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 3 May 2018 14:49:28 +0300 Subject: Let QDeclarativeNavigator::{start,stop} update m_active QDeclarativeNavigator should call QNavigatorManager::start() inside QDeclarativeNavigator::start(), however because we were already updating m_active in QDeclarativeNavigator::setActive(), the call for QNavigationManager::start() never happens. Task-number: QTBUG-68066 Change-Id: I486381fdec7fc77ac977ee46683fabd2465cf799 Reviewed-by: Paolo Angelelli --- src/location/labs/qdeclarativenavigator.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/location/labs/qdeclarativenavigator.cpp b/src/location/labs/qdeclarativenavigator.cpp index 475cb650..bcb74c90 100644 --- a/src/location/labs/qdeclarativenavigator.cpp +++ b/src/location/labs/qdeclarativenavigator.cpp @@ -312,10 +312,8 @@ void QDeclarativeNavigator::start() return; } - if (d_ptr->m_active) - return; - - d_ptr->m_active = d_ptr->m_navigationManager->start(); + if (!d_ptr->m_navigationManager->active()) + d_ptr->m_active = d_ptr->m_navigationManager->start(); } void QDeclarativeNavigator::stop() @@ -325,10 +323,8 @@ void QDeclarativeNavigator::stop() return; } - if (!d_ptr->m_active) - return; - - d_ptr->m_active = d_ptr->m_navigationManager->stop(); + if (d_ptr->m_navigationManager->active()) + d_ptr->m_active = d_ptr->m_navigationManager->stop(); } void QDeclarativeNavigator::pluginReady() -- cgit v1.2.1