projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes #410 - away log (you'll find it in the views menu)
[quassel.git]
/
src
/
core
/
sessionthread.cpp
diff --git
a/src/core/sessionthread.cpp
b/src/core/sessionthread.cpp
index
6a17bd9
..
c29d1ff
100644
(file)
--- a/
src/core/sessionthread.cpp
+++ b/
src/core/sessionthread.cpp
@@
-1,5
+1,5
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-0
8 by the Quassel IRC Team
*
+ * Copyright (C) 2005-0
9 by the Quassel Project
*
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-36,9
+36,12
@@
SessionThread::SessionThread(UserId uid, bool restoreState, QObject *parent)
}
SessionThread::~SessionThread() {
}
SessionThread::~SessionThread() {
- // shut down thread gracefully
- quit();
- wait();
+ if(_session) {
+ _session->setParent(0);
+ _session->moveToThread(thread());
+ _session->deleteLater();
+ _session = 0;
+ }
}
CoreSession *SessionThread::session() {
}
CoreSession *SessionThread::session() {
@@
-103,5
+106,13
@@
void SessionThread::run() {
emit initialized();
exec();
delete _session;
emit initialized();
exec();
delete _session;
+ _session = 0;
}
}
+void SessionThread::stopSession() {
+ if(_session) {
+ connect(_session, SIGNAL(destroyed()), this, SLOT(quit()));
+ _session->deleteLater();
+ _session = 0;
+ }
+}