X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fsettings.cpp;h=6b0ce0399f8afb667cc8ad2c96043d843261eda4;hp=12f1f6920b3e8191bb1ab11582e2985d3ba48bd5;hb=17a2e7912f49f70273f90ea3f744960a7d08a6b4;hpb=a3aaabf6254c8c5439af8982cc613c4ced3f50ed diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 12f1f692..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,8 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ -#include #include -#ifdef Q_WS_QWS -#include -#endif - #include "settings.h" QHash > Settings::settingsCache; @@ -61,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(); @@ -75,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(); @@ -89,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(); @@ -97,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(); @@ -109,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(); @@ -118,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();