summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/configuredivecomputerdialog.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-15 11:56:17 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-15 16:11:39 -0700
commit0f68e0cc2e6e9c4d4e07b065888b9982086748e7 (patch)
treef1fc7bb8778bbac553f79a142099cace64f72aef /desktop-widgets/configuredivecomputerdialog.cpp
parentc6998ee92680f2724c2a6adbb4c7a06c9bae0633 (diff)
downloadsubsurface-0f68e0cc2e6e9c4d4e07b065888b9982086748e7.tar.gz
desktop-widget: remove SettingsObjectWrapper and update qPref calls
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>
Diffstat (limited to 'desktop-widgets/configuredivecomputerdialog.cpp')
-rw-r--r--desktop-widgets/configuredivecomputerdialog.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/desktop-widgets/configuredivecomputerdialog.cpp b/desktop-widgets/configuredivecomputerdialog.cpp
index 137859388..cb7ec8371 100644
--- a/desktop-widgets/configuredivecomputerdialog.cpp
+++ b/desktop-widgets/configuredivecomputerdialog.cpp
@@ -3,7 +3,7 @@
#include "core/display.h"
#include "core/qthelper.h"
-#include "core/subsurface-qt/SettingsObjectWrapper.h"
+#include "core/settings/qPrefDiveComputer.h"
#include "desktop-widgets/mainwindow.h"
// For fill_computer_list, descriptorLookup
#include "core/downloadfromdcthread.h"
@@ -132,9 +132,8 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDia
memset(&device_data, 0, sizeof(device_data));
fill_computer_list();
- auto dc = SettingsObjectWrapper::instance()->dive_computer_settings;
- if (!dc->device().isEmpty())
- ui.device->setEditText(dc->device());
+ if (!qPrefDiveComputer::device().isEmpty())
+ ui.device->setEditText(qPrefDiveComputer::device());
ui.DiveComputerList->setCurrentRow(0);
on_DiveComputerList_currentRowChanged(0);
@@ -912,11 +911,10 @@ void ConfigureDiveComputerDialog::getDeviceData()
device_data.descriptor = descriptorLookup.value(selected_vendor + selected_product);
device_data.deviceid = device_data.diveid = 0;
- auto dc = SettingsObjectWrapper::instance()->dive_computer_settings;
- dc->set_device(device_data.devname);
+ qPrefDiveComputer::set_device(device_data.devname);
#ifdef BT_SUPPORT
if (ui.bluetoothMode && btDeviceSelectionDialog)
- dc->set_device_name(btDeviceSelectionDialog->getSelectedDeviceName());
+ qPrefDiveComputer::set_device_name(btDeviceSelectionDialog->getSelectedDeviceName());
#endif
}