diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2016-08-25 15:22:04 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-08-27 11:40:45 -0700 |
commit | 5651abfd75f3b3bde45841a8ce4650ae64d9390a (patch) | |
tree | e0e371d0cc1be1d896c4af6cc64545c3d32c754e /mobile-widgets | |
parent | 83236f7e9e9842cd895432d5b9762216ffbe2c64 (diff) | |
download | subsurface-5651abfd75f3b3bde45841a8ce4650ae64d9390a.tar.gz |
Settings update: Simplify code by using the SettingsObjectHelper
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index a8dd24948..89873fbb3 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -231,13 +231,9 @@ QMLManager *QMLManager::instance() void QMLManager::savePreferences() { - QSettings s; - s.beginGroup("LocationService"); - s.setValue("time_threshold", timeThreshold() * 60); - prefs.time_threshold = timeThreshold() * 60; - s.setValue("distance_threshold", distanceThreshold()); - prefs.distance_threshold = distanceThreshold(); - s.sync(); + auto location = SettingsObjectWrapper::instance()->location_settings; + location->setTimeThreshold(timeThreshold() * 60); + location->setDistanceThreshold(distanceThreshold()); } #define CLOUDURL QString(prefs.cloud_base_url) |