diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2020-04-14 15:28:44 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2020-04-14 14:15:26 +0000 |
commit | c0c2df203dd26b6af2be5757501bb3cacd692ef6 (patch) | |
tree | 961d12dc7ba7db4fb0c9cb3a338250d65efd64b0 /src/plugins/coreplugin/outputwindow.h | |
parent | 70bddbcab42759c3105db6801a918375449b848c (diff) |
Utils: Split up OutputFormatter class
An OutputFormatter takes some string and prints it into a text edit.
In addition, it can ask any number of registered OutputLineParsers
whether they think any special formatting should be applied to the
current line.
This mechanism is now properly modeled by our class design, rather than
being hidden in a monolithic class where everything had the same type,
no matter what its purpose was.
Prospective contributors can now simply be pointed to the
OutputLineParser class and will see at one glance what they have to do.
Change-Id: I9844499f062c94fb038ce73fd6f26576910148c2
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/outputwindow.h')
-rw-r--r-- | src/plugins/coreplugin/outputwindow.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/coreplugin/outputwindow.h b/src/plugins/coreplugin/outputwindow.h index 77703f0b9a..4e94d66af5 100644 --- a/src/plugins/coreplugin/outputwindow.h +++ b/src/plugins/coreplugin/outputwindow.h @@ -34,7 +34,7 @@ #include <QPlainTextEdit> #include <QTimer> -namespace Utils { class OutputFormatter; } +namespace Utils { class OutputLineParser; } namespace Core { @@ -56,7 +56,7 @@ public: OutputWindow(Context context, const QString &settingsKey, QWidget *parent = nullptr); ~OutputWindow() override; - void setFormatters(const QList<Utils::OutputFormatter *> &formatters); + void setLineParsers(const QList<Utils::OutputLineParser *> &parsers); void appendMessage(const QString &out, Utils::OutputFormat format); |