summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/rbsettings.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2010-01-24 19:24:56 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2010-01-24 19:24:56 +0000
commit12dd944d9bb0acf6a719ddb47ae2b5b160aaffb2 (patch)
tree4b93d57378c2f5d5db519b36efa9b01af3285b23 /rbutil/rbutilqt/base/rbsettings.cpp
parent52a7626bbc89a04768443179d245051b7a9150f5 (diff)
downloadrockbox-12dd944d9bb0acf6a719ddb47ae2b5b160aaffb2.tar.gz
rockbox-12dd944d9bb0acf6a719ddb47ae2b5b160aaffb2.tar.bz2
rockbox-12dd944d9bb0acf6a719ddb47ae2b5b160aaffb2.zip
Respect default values for ServerSettingsList as well. No idea why I missed that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24326 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base/rbsettings.cpp')
-rw-r--r--rbutil/rbutilqt/base/rbsettings.cpp9
1 files changed, 7 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)