mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
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>
This commit is contained in:
parent
83236f7e9e
commit
5651abfd75
1 changed files with 3 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue