summaryrefslogtreecommitdiffstats
path: root/core/settings/qPrefDisplay.cpp
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-07-18 22:52:13 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-25 08:35:04 -0700
commit92ade62260c30be55632047fa97332b2d2d97a8f (patch)
treeda7b01b2a9928b70337d91e76769a9ad91c3a000 /core/settings/qPrefDisplay.cpp
parent3eae683b57d225c680a430c83db1425c38765742 (diff)
downloadsubsurface-92ade62260c30be55632047fa97332b2d2d97a8f.tar.gz
core: remove LOADSYNC* macros
expend LOADSYNC* into DISK_* macros remove LOADSYNC* from qPrefPrivate.h update qPrefDisplay to not use LOADSYNC* Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'core/settings/qPrefDisplay.cpp')
-rw-r--r--core/settings/qPrefDisplay.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/settings/qPrefDisplay.cpp b/core/settings/qPrefDisplay.cpp
index 1579569bf..cf08af8cd 100644
--- a/core/settings/qPrefDisplay.cpp
+++ b/core/settings/qPrefDisplay.cpp
@@ -44,7 +44,7 @@ void qPrefDisplay::set_divelist_font(const QString& value)
void qPrefDisplay::disk_divelist_font(bool doSync)
{
if (doSync)
- LOADSYNC_TXT("/divelist_font", divelist_font)
+ qPrefPrivate::instance()->setting.setValue(group + "/divelist_font", prefs.divelist_font);
else
setCorrectFont();
}
@@ -64,7 +64,7 @@ void qPrefDisplay::set_font_size(double value)
void qPrefDisplay::disk_font_size(bool doSync)
{
if (doSync)
- LOADSYNC_DOUBLE("/font_size", font_size)
+ qPrefPrivate::instance()->setting.setValue(group + "/font_size", prefs.font_size);
else
setCorrectFont();
}
@@ -78,7 +78,6 @@ HANDLE_PREFERENCE_TXT(Display, "/theme", theme);
void qPrefDisplay::setCorrectFont()
{
- bool doSync = false;
QSettings s;
QVariant v;
@@ -103,5 +102,6 @@ void qPrefDisplay::setCorrectFont()
}
defaultFont.setPointSizeF(prefs.font_size);
qApp->setFont(defaultFont);
- LOADSYNC_BOOL("/displayinvalid", display_invalid_dives);
+
+ prefs.display_invalid_dives = qPrefPrivate::instance()->setting.value(group + "/displayinvalid", default_prefs.display_invalid_dives).toBool();
}