forked from qt-creator/qt-creator
Output windows: Skip filter function if no filter is set
Running the filter function is (too?) expensive, so make sure that's only done when there actually is a filter. Task-number: QTCREATORBUG-22914 Change-Id: Ie96a4e20ebb10c08d83e75641e70b42b13377b22 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -117,7 +117,10 @@ 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::blockCountChanged, this, [this] {
|
||||
if (!d->filterText.isEmpty())
|
||||
filterNewContent();
|
||||
});
|
||||
|
||||
connect(this, &QPlainTextEdit::undoAvailable, undoAction, &QAction::setEnabled);
|
||||
connect(this, &QPlainTextEdit::redoAvailable, redoAction, &QAction::setEnabled);
|
||||
|
Reference in New Issue
Block a user