Otherwise, when QObject cleanup, which runs after our destructor,
destroys the terminalPart, it would call back into us
when we're already half-destroyed.
This trips an assert in Qt "Called object is not of the correct
type (class destructor may have already run)"
TerminalPanel::~TerminalPanel()
{
TerminalPanel::~TerminalPanel()
{
+ // Avoid when QObject cleanup, which comes after our destructor, deletes the konsolePart
+ // and subsequently calls back into our slot when the destructor has already run.
+ disconnect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited);
}
void TerminalPanel::goHome()
}
void TerminalPanel::goHome()