mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +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()
|
void QMLManager::savePreferences()
|
||||||
{
|
{
|
||||||
QSettings s;
|
auto location = SettingsObjectWrapper::instance()->location_settings;
|
||||||
s.beginGroup("LocationService");
|
location->setTimeThreshold(timeThreshold() * 60);
|
||||||
s.setValue("time_threshold", timeThreshold() * 60);
|
location->setDistanceThreshold(distanceThreshold());
|
||||||
prefs.time_threshold = timeThreshold() * 60;
|
|
||||||
s.setValue("distance_threshold", distanceThreshold());
|
|
||||||
prefs.distance_threshold = distanceThreshold();
|
|
||||||
s.sync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define CLOUDURL QString(prefs.cloud_base_url)
|
#define CLOUDURL QString(prefs.cloud_base_url)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue