/***************************************************************************
- * Copyright (C) 2005-08 by the Quassel Project *
+ * Copyright (C) 2005-09 by the Quassel Project *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#include <QSettings>
#include <QStringList>
-#ifdef Q_WS_QWS
-#include <Qtopia>
-#endif
-
#include "settings.h"
QHash<QString, QHash<QString, QVariant> > Settings::settingsCache;
}
QStringList Settings::allLocalKeys() {
- QSettings s(org(), appName);
+ QSettings s(fileName(), format());
s.beginGroup(group);
QStringList res = s.allKeys();
s.endGroup();
else
g = QString("%1/%2").arg(group, rootkey);
- QSettings s(org(), appName);
+ QSettings s(fileName(), format());
s.beginGroup(g);
QStringList res = s.childKeys();
s.endGroup();
else
g = QString("%1/%2").arg(group, rootkey);
- QSettings s(org(), appName);
+ QSettings s(fileName(), format());
s.beginGroup(g);
QStringList res = s.childGroups();
s.endGroup();
}
void Settings::setLocalValue(const QString &key, const QVariant &data) {
- QSettings s(org(), appName);
+ QSettings s(fileName(), format());
s.beginGroup(group);
s.setValue(key, data);
s.endGroup();
const QVariant &Settings::localValue(const QString &key, const QVariant &def) {
if(!isCached(group, key)) {
- QSettings s(org(), appName);
+ QSettings s(fileName(), format());
s.beginGroup(group);
setCacheValue(group, key, s.value(key, def));
s.endGroup();
}
void Settings::removeLocalKey(const QString &key) {
- QSettings s(org(), appName);
+ QSettings s(fileName(), format());
s.beginGroup(group);
s.remove(key);
s.endGroup();