mirror of
https://invent.kde.org/system/dolphin
synced 2024-08-22 01:40:02 +00:00
TerminalPanel: Disconnect signal in destructor only when we have a konsolePart
This commit is contained in:
parent
856716e8b6
commit
b6d9cb9949
|
@ -47,10 +47,12 @@ TerminalPanel::TerminalPanel(QWidget *parent)
|
||||||
|
|
||||||
TerminalPanel::~TerminalPanel()
|
TerminalPanel::~TerminalPanel()
|
||||||
{
|
{
|
||||||
|
if (m_konsolePart) {
|
||||||
// Avoid when QObject cleanup, which comes after our destructor, deletes the konsolePart
|
// 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.
|
// and subsequently calls back into our slot when the destructor has already run.
|
||||||
disconnect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited);
|
disconnect(m_konsolePart, &KParts::ReadOnlyPart::destroyed, this, &TerminalPanel::terminalExited);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TerminalPanel::goHome()
|
void TerminalPanel::goHome()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue