forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user