diff options
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r-- | rbutil/rbutilqt/base/rbsettings.cpp | 9 | ||||
-rw-r--r-- | rbutil/rbutilqt/base/rbsettings.h | 1 |
2 files changed, 8 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/rbsettings.cpp b/rbutil/rbutilqt/base/rbsettings.cpp index 6039f9558e..ca870fc932 100644 --- a/rbutil/rbutilqt/base/rbsettings.cpp +++ b/rbutil/rbutilqt/base/rbsettings.cpp | |||
@@ -111,6 +111,7 @@ const static struct { | |||
111 | //! pointer to setting object to NULL | 111 | //! pointer to setting object to NULL |
112 | QSettings* RbSettings::systemSettings = NULL; | 112 | QSettings* RbSettings::systemSettings = NULL; |
113 | QSettings* RbSettings::userSettings = NULL; | 113 | QSettings* RbSettings::userSettings = NULL; |
114 | //! global volatile settings | ||
114 | QMap<QString, QVariant> RbSettings::serverSettings; | 115 | QMap<QString, QVariant> RbSettings::serverSettings; |
115 | 116 | ||
116 | void RbSettings::ensureRbSettingsExists() | 117 | void RbSettings::ensureRbSettingsExists() |
@@ -225,8 +226,12 @@ QVariant RbSettings::value(enum ServerSettings setting) | |||
225 | i++; | 226 | i++; |
226 | 227 | ||
227 | QString s = constructSettingPath(ServerSettingsList[i].name); | 228 | QString s = constructSettingPath(ServerSettingsList[i].name); |
228 | qDebug() << "[Settings] GET SERV:" << s << serverSettings.value(s, ServerSettingsList[i].def).toString(); | 229 | qDebug() << "[Settings] GET SERV:" << s |
229 | return serverSettings.value(s); | 230 | << serverSettings.value(s, ServerSettingsList[i].def).toString(); |
231 | if(serverSettings.contains(s)) | ||
232 | return serverSettings.value(s); | ||
233 | else | ||
234 | return ServerSettingsList[i].def; | ||
230 | } | 235 | } |
231 | 236 | ||
232 | void RbSettings::setValue(enum UserSettings setting , QVariant value) | 237 | void RbSettings::setValue(enum UserSettings setting , QVariant value) |
diff --git a/rbutil/rbutilqt/base/rbsettings.h b/rbutil/rbutilqt/base/rbsettings.h index b7327b19cb..ba0c393939 100644 --- a/rbutil/rbutilqt/base/rbsettings.h +++ b/rbutil/rbutilqt/base/rbsettings.h | |||
@@ -151,6 +151,7 @@ class RbSettings : public QObject | |||
151 | //! pointers to our setting objects | 151 | //! pointers to our setting objects |
152 | static QSettings *systemSettings; | 152 | static QSettings *systemSettings; |
153 | static QSettings *userSettings; | 153 | static QSettings *userSettings; |
154 | //! global volatile settings | ||
154 | static QMap<QString, QVariant> serverSettings; | 155 | static QMap<QString, QVariant> serverSettings; |
155 | }; | 156 | }; |
156 | 157 | ||