Add text search functionality to output window centrally

All output windows should be searchable with Edit > Find/Replace
(Ctrl+F), no reason for every single instance setting that up
individually.

Add a find placeholder for the build system output in Projects mode, so
the search functionality is available there as well.

Change-Id: Idad6824bfb21e6ae9ab923191a7e83b43256e68b
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Eike Ziller
2021-09-14 16:42:05 +02:00
parent 9815d2ee7e
commit 29df497d25
6 changed files with 23 additions and 39 deletions

View File

@@ -27,8 +27,6 @@
#include <coreplugin/editormanager/editormanager.h>
#include <aggregation/aggregate.h>
#include <coreplugin/find/basetextfind.h>
#include <coreplugin/outputwindow.h>
#include <utils/fileutils.h>
#include <utils/qtcprocess.h>
@@ -123,9 +121,6 @@ OutputWindowPlainTextEdit::OutputWindowPlainTextEdit(QWidget *parent) :
outputFormatter()->setBoldFontEnabled(false);
m_parser = new VcsOutputLineParser;
setLineParsers({m_parser});
auto agg = new Aggregation::Aggregate;
agg->add(this);
agg->add(new Core::BaseTextFind(this));
}
// Search back for beginning of word