diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2019-06-06 14:08:37 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2019-06-11 12:02:55 +0000 |
commit | df6bbdd191361972ec3d9f70e8cd0f282759bc7d (patch) | |
tree | 5f18b946f8d89757531c797118101707961e0f66 /src/plugins/coreplugin | |
parent | 32afe831084d09acf447f129282e371fa0c892f7 (diff) | |
download | qt-creator-df6bbdd191361972ec3d9f70e8cd0f282759bc7d.tar.gz |
Output panes: Fix filtering newly added content
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 <aha_1980@gmx.de>
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/coreplugin')
-rw-r--r-- | src/plugins/coreplugin/outputwindow.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/plugins/coreplugin/outputwindow.cpp b/src/plugins/coreplugin/outputwindow.cpp index 2b5de1b2b6..0ed7542ee1 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) |