From 5651abfd75f3b3bde45841a8ce4650ae64d9390a Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 25 Aug 2016 15:22:04 -0300 Subject: Settings update: Simplify code by using the SettingsObjectHelper Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- mobile-widgets/qmlmanager.cpp | 10 +++------- 1 file 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) -- cgit v1.2.3-70-g09d2