From 8d2e940b5018dd4ce052127d816c0a16f178e7d4 Mon Sep 17 00:00:00 2001 From: Sebastian Goth Date: Thu, 10 Dec 2009 13:01:17 +0100 Subject: [PATCH] Cleanup netsplits on disconnect correctly --- src/core/ircserverhandler.cpp | 9 +++++++-- src/core/ircserverhandler.h | 6 ++++++ 2 files changed, 13 insertions(+), 2 deletions(-) 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); -- 2.20.1