X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcoreircchannel.cpp;h=faf249de5b2cc6b5707298bc4b3e89e70e5bacd6;hb=20745bd0cbae035b84913127dfec9e8433d1282d;hp=c2745a8ea6e36b6561590266ef30c5fbe3f022cf;hpb=169266ea6b484f8876679854998cdd6dac6b9e90;p=quassel.git diff --git a/src/core/coreircchannel.cpp b/src/core/coreircchannel.cpp index c2745a8e..faf249de 100644 --- a/src/core/coreircchannel.cpp +++ b/src/core/coreircchannel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2015 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 * @@ -21,16 +21,15 @@ #include "coreircchannel.h" #include "corenetwork.h" -INIT_SYNCABLE_OBJECT(CoreIrcChannel) CoreIrcChannel::CoreIrcChannel(const QString &channelname, Network *network) : IrcChannel(channelname, network), _receivedWelcomeMsg(false) { #ifdef HAVE_QCA2 - _cipher = 0; + _cipher = nullptr; // Get the cipher key from CoreNetwork if present - CoreNetwork *coreNetwork = qobject_cast(network); + auto *coreNetwork = qobject_cast(network); if (coreNetwork) { QByteArray key = coreNetwork->readChannelCipherKey(channelname); if (!key.isEmpty()) { @@ -48,7 +47,7 @@ CoreIrcChannel::~CoreIrcChannel() // exists. There is no need to store the empty key if no cipher exists; no // key was present when instantiating and no key was set during the // channel's lifetime. - CoreNetwork *coreNetwork = qobject_cast(network()); + auto *coreNetwork = qobject_cast(network()); if (coreNetwork && _cipher) { coreNetwork->storeChannelCipherKey(name(), _cipher->key()); }