summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/preferences/preferences_defaults.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-08-12 21:58:25 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-14 09:09:06 -0700
commit691025fa2440d76e1b208a3ecd280a4aec646890 (patch)
tree6fb9cdbf743c6e6abb95c0f138530ca0e3d0cd09 /desktop-widgets/preferences/preferences_defaults.cpp
parent4a7864444ba5c90e4113e704a593d0fc4e6207b8 (diff)
downloadsubsurface-691025fa2440d76e1b208a3ecd280a4aec646890.tar.gz
core: activate qPrefGeneral
remove General from SettingsObjectWrapper and reference qPrefGeneral update files using SettingsObjectWrapper/General to use qPrefGeneral this activated qPrefGeneral and removed the similar class from SettingsObjectWrapper. Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'desktop-widgets/preferences/preferences_defaults.cpp')
-rw-r--r--desktop-widgets/preferences/preferences_defaults.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/desktop-widgets/preferences/preferences_defaults.cpp b/desktop-widgets/preferences/preferences_defaults.cpp
index 4d8aef610..748817e02 100644
--- a/desktop-widgets/preferences/preferences_defaults.cpp
+++ b/desktop-widgets/preferences/preferences_defaults.cpp
@@ -101,19 +101,19 @@ void PreferencesDefaults::refreshSettings()
void PreferencesDefaults::syncSettings()
{
- auto general = SettingsObjectWrapper::instance()->general_settings;
- general->setDefaultFilename(ui->defaultfilename->text());
- general->setDefaultCylinder(ui->default_cylinder->currentText());
- general->setUseDefaultFile(ui->btnUseDefaultFile->isChecked());
+ auto general = qPrefGeneral::instance();
+ general->set_default_filename(ui->defaultfilename->text());
+ general->set_default_cylinder(ui->default_cylinder->currentText());
+ general->set_use_default_file(ui->btnUseDefaultFile->isChecked());
if (ui->noDefaultFile->isChecked())
- general->setDefaultFileBehavior(NO_DEFAULT_FILE);
+ general->set_default_file_behavior(NO_DEFAULT_FILE);
else if (ui->localDefaultFile->isChecked())
- general->setDefaultFileBehavior(LOCAL_DEFAULT_FILE);
+ general->set_default_file_behavior(LOCAL_DEFAULT_FILE);
else if (ui->cloudDefaultFile->isChecked())
- general->setDefaultFileBehavior(CLOUD_DEFAULT_FILE);
- general->setExtractVideoThumbnails(ui->extractVideoThumbnails->isChecked());
- general->setExtractVideoThumbnailsPosition(ui->videoThumbnailPosition->value());
- general->setFfmpegExecutable(ui->ffmpegExecutable->text());
+ general->set_default_file_behavior(CLOUD_DEFAULT_FILE);
+ general->set_extract_video_thumbnails(ui->extractVideoThumbnails->isChecked());
+ general->set_extract_video_thumbnails_position(ui->videoThumbnailPosition->value());
+ general->set_ffmpeg_executable(ui->ffmpegExecutable->text());
auto display = qPrefDisplay::instance();
display->set_divelist_font(ui->font->currentFont().toString());