X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcorehighlightrulemanager.cpp;h=40d056655f437daf0bf8da735b2d2396b7232fa4;hp=eed5655be55a08ede04950e6bae005a2a276e125;hb=8dfdd498679c773cf2e7958c5fd434bf56f634e3;hpb=b3b83bb123fb3087eba7147539ec0e7a34c6258b diff --git a/src/core/corehighlightrulemanager.cpp b/src/core/corehighlightrulemanager.cpp index eed5655b..40d05665 100644 --- a/src/core/corehighlightrulemanager.cpp +++ b/src/core/corehighlightrulemanager.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -25,8 +25,7 @@ constexpr auto settingsKey = "HighlightRuleList"; -INIT_SYNCABLE_OBJECT(CoreHighlightRuleManager) -CoreHighlightRuleManager::CoreHighlightRuleManager(CoreSession *session) +CoreHighlightRuleManager::CoreHighlightRuleManager(CoreSession* session) : HighlightRuleManager(session) , _coreSession{session} { @@ -37,7 +36,7 @@ CoreHighlightRuleManager::CoreHighlightRuleManager(CoreSession *session) // Otherwise, we just use the defaults initialized in the base class // We store our settings whenever they change - connect(this, SIGNAL(updatedRemotely()), SLOT(save())); + connect(this, &SyncableObject::updatedRemotely, this, &CoreHighlightRuleManager::save); } void CoreHighlightRuleManager::save() @@ -45,8 +44,7 @@ void CoreHighlightRuleManager::save() Core::setUserSetting(_coreSession->user(), settingsKey, toVariantMap()); } -bool CoreHighlightRuleManager::match(const RawMessage &msg, const QString ¤tNick, - const QStringList &identityNicks) +bool CoreHighlightRuleManager::match(const RawMessage& msg, const QString& currentNick, const QStringList& identityNicks) { - return match(msg.text, msg.sender, msg.type, msg.flags, msg.target, currentNick, identityNicks); + return match(msg.networkId, msg.text, msg.sender, msg.type, msg.flags, msg.target, currentNick, identityNicks); }