mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 09:50:12 +00:00
TerminalPanel: Disconnect destroyed signal in destructor
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)"
This commit is contained in:
parent
64e40c1d93
commit
856716e8b6
|
@ -47,6 +47,9 @@ TerminalPanel::TerminalPanel(QWidget *parent)
|
||||||
|
|
||||||
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()
|
||||||
|
|
Loading…
Reference in a new issue