Print a warning rather than aborting if the session count is non-zero at exit. Will look into this more carefully later.

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=789684
This commit is contained in:
Robert Knight
2008-03-24 21:48:32 +00:00
parent 7c0e81dada
commit 85bada8fa8

View File

@@ -215,11 +215,22 @@ void SessionManager::closeAll()
{
// close remaining sessions
foreach( Session* session , _sessions )
{
session->close();
}
_sessions.clear();
}
SessionManager::~SessionManager()
{
Q_ASSERT(_sessions.count() == 0);
// TODO This test sometimes fails when using KDevelop. Look into and fix it.
if (_sessions.count() == 0)
{
kWarning() << "Konsole SessionManager destroyed with sessions still alive";
// ensure that the Session doesn't later try to call back and do things to the
// SessionManager
foreach(Session* session , _sessions)
disconnect(session , 0 , this , 0);
}
}
const QList<Session*> SessionManager::sessions()