diff options
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index c2b2b66fd..a9c855eab 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1297,7 +1297,12 @@ QString QMLManager::getCurrentPosition() if (!hasLocationSource) return tr("Unknown GPS location"); - return locationProvider->currentPosition(); + QString positionResponse = locationProvider->currentPosition(); + if (positionResponse == GPS_CURRENT_POS) + connect(locationProvider, &GpsLocation::acquiredPosition, this, &QMLManager::waitingForPositionChanged, Qt::UniqueConnection); + else + disconnect(locationProvider, &GpsLocation::acquiredPosition, this, &QMLManager::waitingForPositionChanged); + return positionResponse; } void QMLManager::applyGpsData() |