X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcommon%2Fsettings.cpp;h=6b0ce0399f8afb667cc8ad2c96043d843261eda4;hb=366f5e334c898bef4b88605cf5cf2ee2feabffb1;hp=83fb8fb3406ad487f26fabab6384554d4fc65826;hpb=eaba93b703ba5bca4edf09f4c076a00b529115cd;p=quassel.git diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 83fb8fb3..6b0ce039 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * 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 * @@ -18,13 +18,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include #include -#include - -#ifdef Q_WS_QWS -#include -#endif #include "settings.h" @@ -62,7 +56,7 @@ void Settings::notify(const QString &key, QObject *receiver, const char *slot) { } QStringList Settings::allLocalKeys() { - QSettings s(org(), appName); + QSettings s(fileName(), format()); s.beginGroup(group); QStringList res = s.allKeys(); s.endGroup(); @@ -76,7 +70,7 @@ QStringList Settings::localChildKeys(const QString &rootkey) { 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(); @@ -90,7 +84,7 @@ QStringList Settings::localChildGroups(const QString &rootkey) { 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(); @@ -98,7 +92,7 @@ QStringList Settings::localChildGroups(const QString &rootkey) { } 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(); @@ -110,7 +104,7 @@ void Settings::setLocalValue(const QString &key, const QVariant &data) { 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(); @@ -119,7 +113,7 @@ const QVariant &Settings::localValue(const QString &key, const QVariant &def) { } void Settings::removeLocalKey(const QString &key) { - QSettings s(org(), appName); + QSettings s(fileName(), format()); s.beginGroup(group); s.remove(key); s.endGroup();