desktop-widgets/preferences: reemove SettingsObjectWrapper

remove use of SettingsObjectWrapper::
remove include of SettingsObjectWrapper.h
use qPrefFoo:: for setters and getters
replace prefs.foo with qPrefXYZ::foo() where feasible
(this expands to the same code, but gives us more control
over the variable).

Signed-off-by: Jan Iversen <jani@apache.org>
This commit is contained in:
jan Iversen 2018-08-15 11:50:53 +02:00 committed by Dirk Hohndel
parent 3b84dbe554
commit 6aee600aa7
6 changed files with 71 additions and 81 deletions

View file

@ -2,7 +2,7 @@
#include "preferences_georeference.h"
#include "ui_preferences_georeference.h"
#include "core/qthelper.h"
#include "core/subsurface-qt/SettingsObjectWrapper.h"
#include "core/settings/qPrefGeocoding.h"
#include "qt-models/divelocationmodel.h"
#include <ctime>
@ -30,8 +30,7 @@ void PreferencesGeoreference::refreshSettings()
void PreferencesGeoreference::syncSettings()
{
auto geocoding = qPrefGeocoding::instance();
geocoding->set_first_taxonomy_category((taxonomy_category) ui->first_item->currentIndex());
geocoding->set_second_taxonomy_category((taxonomy_category) ui->second_item->currentIndex());
geocoding->set_third_taxonomy_category((taxonomy_category) ui->third_item->currentIndex());
qPrefGeocoding::set_first_taxonomy_category((taxonomy_category) ui->first_item->currentIndex());
qPrefGeocoding::set_second_taxonomy_category((taxonomy_category) ui->second_item->currentIndex());
qPrefGeocoding::set_third_taxonomy_category((taxonomy_category) ui->third_item->currentIndex());
}