diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-11 12:34:56 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-11-11 15:28:10 -0800 |
commit | cd7d6ae6e51a8422a141fc389b2eca232b7e93c5 (patch) | |
tree | 055252befcf672c1a1355329bc5e981f6b7ad988 /qt-mobile/qmlmanager.cpp | |
parent | a29e74e2e949696c4ffdefeedad22ae1795f024c (diff) | |
download | subsurface-cd7d6ae6e51a8422a141fc389b2eca232b7e93c5.tar.gz |
Location service: toggle the service from the main menu
That way we don't track the user's location until explicitly asked to do
so.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlmanager.cpp')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 3459175f2..1f2dd4c98 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -19,6 +19,7 @@ QMLManager::QMLManager() { // create location manager service locationProvider = new GpsLocation(this); + setLocationServiceEnabled(false); // Initialize cloud credentials. setCloudUserName(prefs.cloud_storage_email); @@ -174,6 +175,16 @@ void QMLManager::setSaveCloudPassword(bool saveCloudPassword) m_saveCloudPassword = saveCloudPassword; } +bool QMLManager::locationServiceEnabled() const +{ + return m_locationServiceEnabled; +} + +void QMLManager::setLocationServiceEnabled(bool locationServiceEnabled) +{ + m_locationServiceEnabled = locationServiceEnabled; + locationProvider->serviceEnable(m_locationServiceEnabled); +} QString QMLManager::cloudPassword() const { |