From 37623c76e481ad76c2a0205a54ca8979eecef446 Mon Sep 17 00:00:00 2001 From: David Faure Date: Sun, 18 Jun 2000 20:32:57 +0000 Subject: [PATCH] This probably fixes another crash - in fact I thought I added this disconnect long ago... svn path=/trunk/kdebase/konsole/; revision=53612 --- src/konsole_part.C | 16 +++++++--------- src/session.C | 2 -- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/konsole_part.C b/src/konsole_part.C index 3a6c77d3..00c4b5ab 100644 --- a/src/konsole_part.C +++ b/src/konsole_part.C @@ -35,10 +35,6 @@ #include -#include // for XFlush -#undef KeyPress - - extern "C" { /** @@ -142,27 +138,29 @@ konsolePart::konsolePart(QWidget *parentWidget, const char *widgetName, QObject // kDebugInfo("Loading successful"); // kDebugInfo("XML file set"); - // (David): re-enabled the direct call to run, it seems to work too !? initial->run(); - //QTimer::singleShot(0,initial,SLOT(run())); connect( initial, SIGNAL( destroyed() ), this, SLOT( sessionDestroyed() ) ); } void konsolePart::doneSession(TESession*,int) { - // without this donePty will be called after we deleted everything (->crashes) - XFlush( qt_xdisplay() ); // see doneSession in konsole.C if (initial) { + kdDebug() << "doneSession - disconnecting done" << endl;; + disconnect( initial,SIGNAL(done(TESession*,int)), + this,SLOT(doneSession(TESession*,int)) ); initial->setConnect(FALSE); - QTimer::singleShot(100,initial,SLOT(terminate())); + //QTimer::singleShot(100,initial,SLOT(terminate())); + kdDebug() << "initial->terminate()" << endl;; + initial->terminate(); } } void konsolePart::sessionDestroyed() { + kdDebug() << "sessionDestroyed()" << endl;; disconnect( initial, SIGNAL( destroyed() ), this, SLOT( sessionDestroyed() ) ); initial = 0; delete this; diff --git a/src/session.C b/src/session.C index bdeb6b6e..929c8b07 100644 --- a/src/session.C +++ b/src/session.C @@ -39,8 +39,6 @@ TESession::TESession(KTMainWindow* main, TEWidget* te, const char* _pgm, QStrLis QObject::connect( em,SIGNAL(changeTitle(int, const QString&)), main,SLOT(changeTitle(int, const QString&)) ); QObject::connect( sh,SIGNAL(done(int)), this,SLOT(done(int)) ); - //FIXME: note the right place - // (David: moved the connect away, not sure what that FIXME is about) }