X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreignorelistmanager.cpp;h=1dac9617d554f67ea2a2c411fe49afa61ea55534;hb=42ab7cc22c4702716db2b8bfa1d4545169f772e6;hp=36c703607664030eff7ceb01be0e81dca2fbd567;hpb=694f9bfbf7f1af19108461c7e00d133e55082bce;p=quassel.git diff --git a/src/core/coreignorelistmanager.cpp b/src/core/coreignorelistmanager.cpp index 36c70360..1dac9617 100644 --- a/src/core/coreignorelistmanager.cpp +++ b/src/core/coreignorelistmanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-09 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -15,7 +15,7 @@ * 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 "coreignorelistmanager.h" @@ -23,11 +23,10 @@ #include "core.h" #include "coresession.h" -INIT_SYNCABLE_OBJECT(CoreIgnoreListManager) CoreIgnoreListManager::CoreIgnoreListManager(CoreSession *parent) : IgnoreListManager(parent) { - CoreSession *session = qobject_cast(parent); + auto *session = qobject_cast(parent); if (!session) { qWarning() << "CoreIgnoreListManager: unable to load IgnoreList. Parent is not a Coresession!"; //loadDefaults(); @@ -37,7 +36,7 @@ CoreIgnoreListManager::CoreIgnoreListManager(CoreSession *parent) initSetIgnoreList(Core::getUserSetting(session->user(), "IgnoreList").toMap()); // we store our settings whenever they change - connect(this, SIGNAL(updatedRemotely()), SLOT(save())); + connect(this, &SyncableObject::updatedRemotely, this, &CoreIgnoreListManager::save); //if(isEmpty()) //loadDefaults(); @@ -53,7 +52,7 @@ IgnoreListManager::StrictnessType CoreIgnoreListManager::match(const RawMessage void CoreIgnoreListManager::save() const { - CoreSession *session = qobject_cast(parent()); + auto *session = qobject_cast(parent()); if (!session) { qWarning() << "CoreIgnoreListManager: unable to save IgnoreList. Parent is not a Coresession!"; return; @@ -65,6 +64,7 @@ void CoreIgnoreListManager::save() const //void CoreIgnoreListManager::loadDefaults() { // foreach(IgnoreListItem item, IgnoreListManager::defaults()) { -// addIgnoreListItem(item.ignoreRule, item.isRegEx, item.strictness, item.scope, item.scopeRule); +// addIgnoreListItem(item.contents(), item.isRegEx(), item.strictness(), item.scope(), +// item.scopeRule()); // } //}