Fix crash when closing session

Instead of manually deleting the output suspended label let the QObject
cleanup handle it.

Now it is first deleted manually by us, leading to a potential crash,
and afterwards the QObject cleanup runs, but luckily it doesn' try to
destroy it again.

REVIEW: 128667
BUG: 366706
parent e07a62ed
......@@ -429,7 +429,7 @@ TerminalDisplay::TerminalDisplay(QWidget* parent)
// that TerminalDisplay will handle repainting its entire area.
setAttribute(Qt::WA_OpaquePaintEvent);
_gridLayout = new QGridLayout(this);
_gridLayout = new QGridLayout;
_gridLayout->setContentsMargins(0, 0, 0, 0);
setLayout(_gridLayout);
......@@ -448,9 +448,6 @@ TerminalDisplay::~TerminalDisplay()
disconnect(_blinkCursorTimer);
delete[] _image;
delete _gridLayout;
delete _outputSuspendedLabel;
delete _filterChain;
}
......@@ -3067,8 +3064,7 @@ void TerminalDisplay::outputSuspended(bool suspended)
"<a href=\"http://en.wikipedia.org/wiki/Software_flow_control\">suspended</a>"
" by pressing Ctrl+S."
" Press <b>Ctrl+Q</b> to resume."
" Click <a href=\"#close\">here</a> to dismiss this message.</qt>"),
this);
" Click <a href=\"#close\">here</a> to dismiss this message.</qt>"));
QPalette palette(_outputSuspendedLabel->palette());
KColorScheme::adjustBackground(palette, KColorScheme::NeutralBackground);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment