projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: Allow clean shutdown of the core
[quassel.git]
/
src
/
core
/
coresession.cpp
diff --git
a/src/core/coresession.cpp
b/src/core/coresession.cpp
index
200fadc
..
8d08d5b
100644
(file)
--- a/
src/core/coresession.cpp
+++ b/
src/core/coresession.cpp
@@
-142,6
+142,9
@@
CoreSession::CoreSession(UserId uid, bool restoreState, bool strictIdentEnabled,
p->synchronize(_coreInfo);
p->synchronize(&_ignoreListManager);
p->synchronize(&_highlightRuleManager);
p->synchronize(_coreInfo);
p->synchronize(&_ignoreListManager);
p->synchronize(&_highlightRuleManager);
+ // Listen to network removed events
+ connect(this, SIGNAL(networkRemoved(NetworkId)),
+ &_highlightRuleManager, SLOT(networkRemoved(NetworkId)));
p->synchronize(transferManager());
// Restore session state
if (restoreState)
p->synchronize(transferManager());
// Restore session state
if (restoreState)
@@
-151,7
+154,7
@@
CoreSession::CoreSession(UserId uid, bool restoreState, bool strictIdentEnabled,
}
}
-
CoreSession::~CoreSessio
n()
+
void CoreSession::shutdow
n()
{
saveSessionState();
{
saveSessionState();
@@
-197,6
+200,11
@@
CoreSession::~CoreSession()
// Delete the network now that it's closed
delete net;
}
// Delete the network now that it's closed
delete net;
}
+
+ _networks.clear();
+
+ // Suicide
+ deleteLater();
}
}
@@
-345,7
+353,8
@@
void CoreSession::recvMessageFromServer(NetworkId networkId, Message::Type type,
if (_ignoreListManager.match(rawMsg, networkName) == IgnoreListManager::HardStrictness)
return;
if (_ignoreListManager.match(rawMsg, networkName) == IgnoreListManager::HardStrictness)
return;
- if (_highlightRuleManager.match(rawMsg, currentNetwork->myNick(), currentNetwork->identityPtr()->nicks()))
+
+ if (currentNetwork && _highlightRuleManager.match(rawMsg, currentNetwork->myNick(), currentNetwork->identityPtr()->nicks()))
rawMsg.flags |= Message::Flag::Highlight;
_messageQueue << rawMsg;
rawMsg.flags |= Message::Flag::Highlight;
_messageQueue << rawMsg;