X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoresettings.cpp;h=27b0c7c846c8dd6339e060f99da8abf436196ac3;hp=579713a0b08784a731929ad4a0f4115f69bff608;hb=158443f71d48215eea8b47b836b61afd77654b78;hpb=97d674034551438238c568e8b42efb08e1ba7354 diff --git a/src/core/coresettings.cpp b/src/core/coresettings.cpp index 579713a0..27b0c7c8 100644 --- a/src/core/coresettings.cpp +++ b/src/core/coresettings.cpp @@ -1,11 +1,11 @@ /*************************************************************************** - * Copyright (C) 2005-07 by The Quassel IRC Development Team * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * + * (at your option) version 3. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * @@ -15,45 +15,60 @@ * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #include "coresettings.h" -#include +#include "quassel.h" -CoreSettings::CoreSettings() : Settings("Core") { +CoreSettings::CoreSettings(const QString group) : Settings(group, Quassel::buildInfo().coreApplicationName) +{ } -CoreSettings::~CoreSettings() { + +CoreSettings::~CoreSettings() +{ } -void CoreSettings::setDatabaseSettings(const QVariant &data) { - setLocalValue("DatabaseSettings", data); + +void CoreSettings::setStorageSettings(const QVariant &data) +{ + setLocalValue("StorageSettings", data); } -QVariant CoreSettings::databaseSettings(const QVariant &def) { - return localValue("DatabaseSettings", def); + +QVariant CoreSettings::storageSettings(const QVariant &def) +{ + return localValue("StorageSettings", def); } -void CoreSettings::setPort(const uint &port) { - setLocalValue("Port", port); + +QVariant CoreSettings::authSettings(const QVariant &def) +{ + return localValue("AuthSettings", def); } -uint CoreSettings::port(const uint &def) { - return localValue("Port", def).toUInt(); + +void CoreSettings::setAuthSettings(const QVariant &data) +{ + setLocalValue("AuthSettings", data); } -QStringList CoreSettings::sessionKeys() { - Q_ASSERT(false); - return QStringList(); +// FIXME remove +QVariant CoreSettings::oldDbSettings() +{ + return localValue("DatabaseSettings"); } -void CoreSettings::setSessionValue(const QString &key, const QVariant &data) { - Q_ASSERT(false); + +void CoreSettings::setCoreState(const QVariant &data) +{ + setLocalValue("CoreState", data); } -QVariant CoreSettings::sessionValue(const QString &key, const QVariant &def) { - Q_ASSERT(false); - return QVariant(); + +QVariant CoreSettings::coreState(const QVariant &def) +{ + return localValue("CoreState", def); }