diff options
Diffstat (limited to 'core/prefs-macros.h')
-rw-r--r-- | core/prefs-macros.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/prefs-macros.h b/core/prefs-macros.h index 9208fb82e..7648580ef 100644 --- a/core/prefs-macros.h +++ b/core/prefs-macros.h @@ -18,6 +18,13 @@ else \ prefs.units.field = default_prefs.units.field +#define GET_UNIT_INT(name, field) \ + v = s.value(QString(name)); \ + if (v.isValid()) \ + prefs.units.field = v.toInt(); \ + else \ + prefs.units.field = default_prefs.units.field + #define GET_BOOL(name, field) \ v = s.value(QString(name)); \ if (v.isValid()) \ |