diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2016-08-08 10:34:48 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-08-27 10:46:38 -0700 |
commit | 93c19b18a7fe8e4204a12f3ff99aff6135c5558e (patch) | |
tree | a6e72eab80122e9384df73bec4dea285237b88a3 /desktop-widgets/preferences | |
parent | 8f05afcda30556602f452029049cdc010e26b7f5 (diff) | |
download | subsurface-93c19b18a7fe8e4204a12f3ff99aff6135c5558e.tar.gz |
Settings update: Fix "geocoding"
Use the SettingsObjectWrapper to access "geocoding"
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/preferences')
-rw-r--r-- | desktop-widgets/preferences/preferences_georeference.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/desktop-widgets/preferences/preferences_georeference.cpp b/desktop-widgets/preferences/preferences_georeference.cpp index 8446d0e9a..f626b3141 100644 --- a/desktop-widgets/preferences/preferences_georeference.cpp +++ b/desktop-widgets/preferences/preferences_georeference.cpp @@ -2,6 +2,7 @@ #include "ui_prefs_georeference.h" #include "core/prefs-macros.h" #include "core/qthelper.h" +#include "core/subsurface-qt/SettingsObjectWrapper.h" #include "qt-models/divelocationmodel.h" #include <ctime> @@ -33,13 +34,11 @@ void PreferencesGeoreference::refreshSettings() void PreferencesGeoreference::syncSettings() { - QSettings s; - s.beginGroup("geocoding"); - s.setValue("enable_geocoding", ui->enable_geocoding->isChecked()); - s.setValue("parse_dives_without_gps", ui->parse_without_gps->isChecked()); - s.setValue("tag_existing_dives", ui->tag_existing_dives->isChecked()); - s.setValue("cat0", ui->first_item->currentIndex()); - s.setValue("cat1", ui->second_item->currentIndex()); - s.setValue("cat2", ui->third_item->currentIndex()); - s.endGroup(); + auto geocoding = SettingsObjectWrapper::instance()->geocoding; + geocoding->setEnableGeocoding(ui->enable_geocoding->isChecked()); + geocoding->setParseDiveWithoutGps(ui->parse_without_gps->isChecked()); + geocoding->setTagExistingDives(ui->tag_existing_dives->isChecked()); + geocoding->setFirstTaxonomyCategory((taxonomy_category) ui->first_item->currentIndex()); + geocoding->setSecondTaxonomyCategory((taxonomy_category) ui->second_item->currentIndex()); + geocoding->setThirdTaxonomyCategory((taxonomy_category) ui->third_item->currentIndex()); } |