From: Sebastian Goth Date: Thu, 10 Dec 2009 12:01:17 +0000 (+0100) Subject: Cleanup netsplits on disconnect correctly X-Git-Tag: 0.6-beta1~76 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=863b09125c3bed80b3dfa65eacf587d8bcd3e1e3 Cleanup netsplits on disconnect correctly --- diff --git a/src/core/ircserverhandler.cpp b/src/core/ircserverhandler.cpp index 5c3fe827..d51bb0d6 100644 --- a/src/core/ircserverhandler.cpp +++ b/src/core/ircserverhandler.cpp @@ -36,11 +36,11 @@ IrcServerHandler::IrcServerHandler(CoreNetwork *parent) : BasicHandler(parent), _whois(false) { + connect(parent, SIGNAL(disconnected(NetworkId)), this, SLOT(destroyNetsplits())); } IrcServerHandler::~IrcServerHandler() { - if(!_netsplits.empty()) - qDeleteAll(_netsplits); + destroyNetsplits(); } /*! Handle a raw message string sent by the server. We try to find a suitable handler, otherwise we call a default handler. */ @@ -1164,6 +1164,11 @@ bool IrcServerHandler::checkParamCount(const QString &methodName, const QList ¶ms, int minParams);