projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cleanup netsplits on disconnect correctly
[quassel.git]
/
src
/
core
/
ircserverhandler.cpp
diff --git
a/src/core/ircserverhandler.cpp
b/src/core/ircserverhandler.cpp
index
5c3fe82
..
d51bb0d
100644
(file)
--- a/
src/core/ircserverhandler.cpp
+++ b/
src/core/ircserverhandler.cpp
@@
-36,11
+36,11
@@
IrcServerHandler::IrcServerHandler(CoreNetwork *parent)
: BasicHandler(parent),
_whois(false)
{
: BasicHandler(parent),
_whois(false)
{
+ connect(parent, SIGNAL(disconnected(NetworkId)), this, SLOT(destroyNetsplits()));
}
IrcServerHandler::~IrcServerHandler() {
}
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. */
}
/*! 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<QB
}
}
}
}
+void IrcServerHandler::destroyNetsplits() {
+ qDebug() << "destroyNetsplits()";
+ qDeleteAll(_netsplits);
+ _netsplits.clear();
+}
/***********************************************************************************/
/***********************************************************************************/