From df6bbdd191361972ec3d9f70e8cd0f282759bc7d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 6 Jun 2019 14:08:37 +0200 Subject: [PATCH] Output panes: Fix filtering newly added content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For output panes without a formatter, filtering was only applied to the content that was already there. Newly added content was always shown, regardless of whether it matched or not. Change-Id: I63424a95c0ff4747ef804b62ebde2253782c8a39 Reviewed-by: André Hartmann Reviewed-by: hjk --- src/plugins/coreplugin/outputwindow.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp index 2b5de1b2b6f..0ed7542ee16 100644 --- a/src/plugins/coreplugin/outputwindow.cpp +++ b/src/plugins/coreplugin/outputwindow.cpp @@ -119,6 +119,7 @@ OutputWindow::OutputWindow(Context context, const QString &settingsKey, QWidget connect(copyAction, &QAction::triggered, this, &QPlainTextEdit::copy); connect(pasteAction, &QAction::triggered, this, &QPlainTextEdit::paste); connect(selectAllAction, &QAction::triggered, this, &QPlainTextEdit::selectAll); + connect(this, &QPlainTextEdit::blockCountChanged, this, &OutputWindow::filterNewContent); connect(this, &QPlainTextEdit::undoAvailable, undoAction, &QAction::setEnabled); connect(this, &QPlainTextEdit::redoAvailable, redoAction, &QAction::setEnabled); @@ -216,10 +217,8 @@ OutputFormatter *OutputWindow::formatter() const void OutputWindow::setFormatter(OutputFormatter *formatter) { d->formatter = formatter; - if (d->formatter) { + if (d->formatter) d->formatter->setPlainTextEdit(this); - connect(d->formatter, &OutputFormatter::contentChanged, this, &OutputWindow::filterNewContent); - } } void OutputWindow::showEvent(QShowEvent *e)