X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcore%2Fcoreircuser.cpp;fp=src%2Fcore%2Fcoreircuser.cpp;h=0d5989944a4ae1a32d2f65ab43d3d013283fc155;hp=12ead6d23acab8fefa3f073e20494a70b9ae842b;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hpb=30b159cb876a9495de42e9a3e70ca050516f0805 diff --git a/src/core/coreircuser.cpp b/src/core/coreircuser.cpp index 12ead6d2..0d598994 100644 --- a/src/core/coreircuser.cpp +++ b/src/core/coreircuser.cpp @@ -19,15 +19,17 @@ ***************************************************************************/ #include "coreircuser.h" + #include "corenetwork.h" -CoreIrcUser::CoreIrcUser(const QString &hostmask, Network *network) : IrcUser(hostmask, network) +CoreIrcUser::CoreIrcUser(const QString& hostmask, Network* network) + : IrcUser(hostmask, network) { #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(nick().toLower()); if (!key.isEmpty()) { @@ -40,7 +42,6 @@ CoreIrcUser::CoreIrcUser(const QString &hostmask, Network *network) : IrcUser(ho #endif } - CoreIrcUser::~CoreIrcUser() { #ifdef HAVE_QCA2 @@ -48,7 +49,7 @@ CoreIrcUser::~CoreIrcUser() // 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(nick().toLower(), _cipher->key()); } @@ -57,9 +58,8 @@ CoreIrcUser::~CoreIrcUser() #endif } - #ifdef HAVE_QCA2 -Cipher *CoreIrcUser::cipher() const +Cipher* CoreIrcUser::cipher() const { if (!_cipher) _cipher = new Cipher(); @@ -67,5 +67,4 @@ Cipher *CoreIrcUser::cipher() const return _cipher; } - #endif