From 08689b2f89bc62ad55ab88562d4394d872511075 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 5 May 2014 15:56:49 -0700 Subject: 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 --- qt-ui/preferences.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp index f68ab7014..47f8541db 100644 --- a/qt-ui/preferences.cpp +++ b/qt-ui/preferences.cpp @@ -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 -- cgit v1.2.3-70-g09d2