summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/base/rbsettings.cpp9
-rw-r--r--rbutil/rbutilqt/base/rbsettings.h1
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 {
//! pointer to setting object to NULL
QSettings* RbSettings::systemSettings = NULL;
QSettings* RbSettings::userSettings = NULL;
+//! global volatile settings
QMap<QString, QVariant> RbSettings::serverSettings;
void RbSettings::ensureRbSettingsExists()
@@ -225,8 +226,12 @@ QVariant RbSettings::value(enum ServerSettings setting)
i++;
QString s = constructSettingPath(ServerSettingsList[i].name);
- qDebug() << "[Settings] GET SERV:" << s << serverSettings.value(s, ServerSettingsList[i].def).toString();
- return serverSettings.value(s);
+ qDebug() << "[Settings] GET SERV:" << s
+ << serverSettings.value(s, ServerSettingsList[i].def).toString();
+ if(serverSettings.contains(s))
+ return serverSettings.value(s);
+ else
+ return ServerSettingsList[i].def;
}
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
//! pointers to our setting objects
static QSettings *systemSettings;
static QSettings *userSettings;
+ //! global volatile settings
static QMap<QString, QVariant> serverSettings;
};