summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-13 11:01:07 (GMT)
committerMartin T. H. Sandsmark <martin.sandsmark@kde.org>2016-08-27 14:57:56 (GMT)
commitb2b852cfd7b10fc2ffb668ac87f8ca9236a134e3 (patch)
tree0042f017afa33e68f745bc43df38897039c7165a
parente07a62ede32467089c1e4c57f7fed141ea009c49 (diff)
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
-rw-r--r--src/TerminalDisplay.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/TerminalDisplay.cpp b/src/TerminalDisplay.cpp
index 4f28837..555a991 100644
--- a/src/TerminalDisplay.cpp
+++ b/src/TerminalDisplay.cpp
@@ -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);