X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreircchannel.cpp;fp=src%2Fcore%2Fcoreircchannel.cpp;h=7d7388a00821ec3afc8a42602449adf675299140;hp=faf249de5b2cc6b5707298bc4b3e89e70e5bacd6;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hpb=30b159cb876a9495de42e9a3e70ca050516f0805 diff --git a/src/core/coreircchannel.cpp b/src/core/coreircchannel.cpp index faf249de..7d7388a0 100644 --- a/src/core/coreircchannel.cpp +++ b/src/core/coreircchannel.cpp @@ -19,17 +19,18 @@ ***************************************************************************/ #include "coreircchannel.h" + #include "corenetwork.h" -CoreIrcChannel::CoreIrcChannel(const QString &channelname, Network *network) - : IrcChannel(channelname, network), - _receivedWelcomeMsg(false) +CoreIrcChannel::CoreIrcChannel(const QString& channelname, Network* network) + : IrcChannel(channelname, network) + , _receivedWelcomeMsg(false) { #ifdef HAVE_QCA2 _cipher = nullptr; // Get the cipher key from CoreNetwork if present - auto *coreNetwork = qobject_cast(network); + auto* coreNetwork = qobject_cast(network); if (coreNetwork) { QByteArray key = coreNetwork->readChannelCipherKey(channelname); if (!key.isEmpty()) { @@ -39,7 +40,6 @@ CoreIrcChannel::CoreIrcChannel(const QString &channelname, Network *network) #endif } - CoreIrcChannel::~CoreIrcChannel() { #ifdef HAVE_QCA2 @@ -47,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. - auto *coreNetwork = qobject_cast(network()); + auto* coreNetwork = qobject_cast(network()); if (coreNetwork && _cipher) { coreNetwork->storeChannelCipherKey(name(), _cipher->key()); } @@ -56,9 +56,8 @@ CoreIrcChannel::~CoreIrcChannel() #endif } - #ifdef HAVE_QCA2 -Cipher *CoreIrcChannel::cipher() const +Cipher* CoreIrcChannel::cipher() const { if (!_cipher) _cipher = new Cipher(); @@ -66,7 +65,6 @@ Cipher *CoreIrcChannel::cipher() const return _cipher; } - void CoreIrcChannel::setEncrypted(bool e) { IrcChannel::setEncrypted(e); @@ -83,5 +81,4 @@ void CoreIrcChannel::setEncrypted(bool e) } } - #endif