aboutsummaryrefslogtreecommitdiffstats
path: root/core/prefs-macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/prefs-macros.h')
-rw-r--r--core/prefs-macros.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/prefs-macros.h b/core/prefs-macros.h
index 6f1b665fd..15a9a9867 100644
--- a/core/prefs-macros.h
+++ b/core/prefs-macros.h
@@ -18,10 +18,10 @@
else \
prefs.units.field = default_prefs.units.field
-#define GET_UNIT_BOOL(name, field) \
+#define GET_UNIT_BOOL(name, field) \
v = s.value(QString(name)); \
if (v.isValid()) \
- prefs.units.field = v.toBool(); \
+ prefs.units.field = v.toBool(); \
else \
prefs.units.field = default_prefs.units.field
@@ -53,10 +53,10 @@
else \
prefs.field = default_prefs.field
-#define GET_INT_DEF(name, field, defval) \
+#define GET_INT_DEF(name, field, defval) \
v = s.value(QString(name)); \
if (v.isValid()) \
- prefs.field = v.toInt(); \
+ prefs.field = v.toInt(); \
else \
prefs.field = defval
@@ -65,7 +65,7 @@
if (v.isValid()) \
prefs.field = strdup(v.toString().toUtf8().constData()); \
else \
- prefs.field = default_prefs.field
+ prefs.field = copy_string(default_prefs.field)
#define SAVE_OR_REMOVE_SPECIAL(_setting, _default, _compare, _value) \
if (_compare != _default) \