This probably fixes another crash - in fact I thought I added

this disconnect long ago...

svn path=/trunk/kdebase/konsole/; revision=53612
wilder-portage
David Faure 26 years ago
parent bd43fbc4aa
commit 37623c76e4
  1. 16
      src/konsole_part.C
  2. 2
      src/session.C

@ -35,10 +35,6 @@
#include <qdom.h>
#include <X11/Xlib.h> // 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;

@ -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)
}

Loading…
Cancel
Save