summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJekyll Wu <adaptee@gmail.com>2012-03-23 11:17:13 (GMT)
committerJekyll Wu <adaptee@gmail.com>2012-03-23 13:19:18 (GMT)
commit0e4844a3daa8bc4def7b952e3f936f23e381f71b (patch)
tree10c28686a5599a320830c2bc487e44eb174fcd3b
parentb00bdfadfe52ec63848b77bff7f079096c3c5749 (diff)
Make sure SLOT Session::done() is only triggered once.
For some strange reason, that slot might be triggered for the second time when Session is being destructed. That could introduce crash. So this is more like a workaround than a perfect fix. BUG: 296239 FIXED-IN: 4.8.2
-rw-r--r--src/Session.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Session.cpp b/src/Session.cpp
index ddb43ff..82d20b5 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -840,6 +840,10 @@ Session::~Session()
void Session::done(int exitCode, QProcess::ExitStatus exitStatus)
{
+ // This slot should be triggered only one time
+ disconnect(_shellProcess, SIGNAL(finished(int,QProcess::ExitStatus)),
+ this, SLOT(done(int,QProcess::ExitStatus)));
+
if ( !_autoClose )
{
_userTitle = i18nc("@info:shell This session is done", "Finished");