summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/rbsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/rbsettings.cpp')
-rw-r--r--rbutil/rbutilqt/base/rbsettings.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/rbutil/rbutilqt/base/rbsettings.cpp b/rbutil/rbutilqt/base/rbsettings.cpp
index 527312b108..6039f9558e 100644
--- a/rbutil/rbutilqt/base/rbsettings.cpp
+++ b/rbutil/rbutilqt/base/rbsettings.cpp
@@ -111,7 +111,7 @@ const static struct {
//! pointer to setting object to NULL
QSettings* RbSettings::systemSettings = NULL;
QSettings* RbSettings::userSettings = NULL;
-QSettings* RbSettings::serverSettings = NULL;
+QMap<QString, QVariant> RbSettings::serverSettings;
void RbSettings::ensureRbSettingsExists()
{
@@ -122,12 +122,6 @@ void RbSettings::ensureRbSettingsExists()
systemSettings = new QSettings(":/ini/rbutil.ini", QSettings::IniFormat, 0);
}
- if(serverSettings == NULL)
- {
- serverSettings = new QSettings(QSettings::IniFormat,
- QSettings::UserScope, "rockbox.org", "RockboxUtility",NULL);
- }
-
if(userSettings == NULL)
{
// portable installation:
@@ -231,8 +225,8 @@ 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, ServerSettingsList[i].def);
+ qDebug() << "[Settings] GET SERV:" << s << serverSettings.value(s, ServerSettingsList[i].def).toString();
+ return serverSettings.value(s);
}
void RbSettings::setValue(enum UserSettings setting , QVariant value)
@@ -257,8 +251,8 @@ void RbSettings::setSubValue(QString sub, enum UserSettings setting, QVariant va
void RbSettings::setValue(enum ServerSettings setting, QVariant value)
{
- QString empty;
- return setPlatformValue(empty, setting, value);
+ QString empty;
+ return setPlatformValue(empty, setting, value);
}
void RbSettings::setPlatformValue(QString platform, enum ServerSettings setting, QVariant value)
@@ -272,8 +266,8 @@ void RbSettings::setPlatformValue(QString platform, enum ServerSettings setting,
QString s = ServerSettingsList[i].name;
s.replace(":platform:", platform);
- serverSettings->setValue(s, value);
- qDebug() << "[Settings] SET SERV:" << s << serverSettings->value(s).toString();
+ serverSettings.insert(s, value);
+ qDebug() << "[Settings] SET SERV:" << s << serverSettings.value(s).toString();
}