diff options
Diffstat (limited to 'core/settings/qPrefDisplay.cpp')
-rw-r--r-- | core/settings/qPrefDisplay.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/core/settings/qPrefDisplay.cpp b/core/settings/qPrefDisplay.cpp index ef4d8e1b8..c22c6b5b6 100644 --- a/core/settings/qPrefDisplay.cpp +++ b/core/settings/qPrefDisplay.cpp @@ -90,7 +90,7 @@ void qPrefDisplay::set_divelist_font(const QString &value) void qPrefDisplay::disk_divelist_font(bool doSync) { if (doSync) - qPrefPrivate::propSetValue(group + "/divelist_font", prefs.divelist_font, default_prefs.divelist_font); + qPrefPrivate::propSetValue(keyFromGroupAndName(group, "divelist_font"), prefs.divelist_font, default_prefs.divelist_font); else setCorrectFont(); } @@ -110,29 +110,29 @@ void qPrefDisplay::set_font_size(double value) void qPrefDisplay::disk_font_size(bool doSync) { if (doSync) - qPrefPrivate::propSetValue(group + "/font_size", prefs.font_size, default_prefs.font_size); + qPrefPrivate::propSetValue(keyFromGroupAndName(group, "font_size"), prefs.font_size, default_prefs.font_size); else setCorrectFont(); } //JAN static const QString group = QStringLiteral("Animations"); -HANDLE_PREFERENCE_INT(Display, "/animation_speed", animation_speed); +HANDLE_PREFERENCE_INT(Display, "animation_speed", animation_speed); -HANDLE_PREFERENCE_BOOL(Display, "/displayinvalid", display_invalid_dives); +HANDLE_PREFERENCE_BOOL(Display, "displayinvalid", display_invalid_dives); -HANDLE_PREFERENCE_BOOL(Display, "/show_developer", show_developer); +HANDLE_PREFERENCE_BOOL(Display, "show_developer", show_developer); void qPrefDisplay::setCorrectFont() { // get the font from the settings or our defaults // respect the system default font size if none is explicitly set - QFont defaultFont = qPrefPrivate::propValue(group + "/divelist_font", prefs.divelist_font).value<QFont>(); + QFont defaultFont = qPrefPrivate::propValue(keyFromGroupAndName(group, "divelist_font"), prefs.divelist_font).value<QFont>(); if (IS_FP_SAME(system_divelist_default_font_size, -1.0)) { prefs.font_size = qApp->font().pointSizeF(); system_divelist_default_font_size = prefs.font_size; // this way we don't save it on exit } - prefs.font_size = qPrefPrivate::propValue(group + "/font_size", prefs.font_size).toFloat(); + prefs.font_size = qPrefPrivate::propValue(keyFromGroupAndName(group, "font_size"), prefs.font_size).toFloat(); // painful effort to ignore previous default fonts on Windows - ridiculous QString fontName = defaultFont.toString(); if (fontName.contains(",")) @@ -146,7 +146,7 @@ void qPrefDisplay::setCorrectFont() defaultFont.setPointSizeF(prefs.font_size); qApp->setFont(defaultFont); - prefs.display_invalid_dives = qPrefPrivate::propValue(group + "/displayinvalid", default_prefs.display_invalid_dives).toBool(); + prefs.display_invalid_dives = qPrefPrivate::propValue(keyFromGroupAndName(group, "displayinvalid"), default_prefs.display_invalid_dives).toBool(); } HANDLE_PROP_QSTRING(Display, "FileDialog/LastDir", lastDir); |