mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Correctly parse boolean preferences
QVariant does the right thing, regardless of whether the value is stored as int or as string - so let's just use that instead of manually checking for integers (and failing if the values are stored as "true" and "false"). Fixes #511 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7809077b33
commit
08689b2f89
1 changed files with 1 additions and 1 deletions
|
@ -143,7 +143,7 @@ void PreferencesDialog::rememberPrefs()
|
|||
#define GET_BOOL(name, field) \
|
||||
v = s.value(QString(name)); \
|
||||
if (v.isValid()) \
|
||||
prefs.field = v.toInt() ? true : false; \
|
||||
prefs.field = v.toBool(); \
|
||||
else \
|
||||
prefs.field = default_prefs.field
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue