aboutsummaryrefslogtreecommitdiffstats
path: root/src/tools
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2020-04-08 17:45:39 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2020-04-09 14:49:32 +0000
commit45ba9fcd535e4cfd5f057149b1ca4bb4dfed5bdb (patch)
tree3e3246ccf3d971e69004182007bd1b726b88b8bf /src/tools
parentfa517bd72aa21ea82072af27ce98030c4ff028f2 (diff)
Output parsers: Replace the chaining approach
Use "flat" aggregation instead. This is another step towards the formatter/parser merger. Along the way, also fix some some subclasses (mostly in BareMetal) that erroneously forwarded handled output to other parsers. Task-number: QTCREATORBUG-22665 Change-Id: I12947349ca663d2e6bbfc99efd069d69e2b54969 Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/buildoutputparser/outputprocessor.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/tools/buildoutputparser/outputprocessor.cpp b/src/tools/buildoutputparser/outputprocessor.cpp
index bdb6b07191..adfdf5031b 100644
--- a/src/tools/buildoutputparser/outputprocessor.cpp
+++ b/src/tools/buildoutputparser/outputprocessor.cpp
@@ -54,19 +54,20 @@ CompilerOutputProcessor::~CompilerOutputProcessor()
void CompilerOutputProcessor::start()
{
- ProjectExplorer::OsParser parser;
- parser.appendOutputParser(new QmakeProjectManager::QMakeParser);
- parser.appendOutputParser(new ProjectExplorer::GnuMakeParser);
- parser.appendOutputParser(new QtSupport::QtParser);
+ ProjectExplorer::IOutputParser parser;
+ parser.addLineParser(new ProjectExplorer::OsParser);
+ parser.addLineParser(new QmakeProjectManager::QMakeParser);
+ parser.addLineParser(new ProjectExplorer::GnuMakeParser);
+ parser.addLineParser(new QtSupport::QtParser);
switch (m_compilerType) {
case CompilerTypeGcc:
- parser.appendOutputParser(new ProjectExplorer::GccParser);
+ parser.addLineParsers(ProjectExplorer::GccParser::gccParserSuite());
break;
case CompilerTypeClang:
- parser.appendOutputParser(new ProjectExplorer::ClangParser);
+ parser.addLineParsers(ProjectExplorer::ClangParser::clangParserSuite());
break;
case CompilerTypeMsvc:
- parser.appendOutputParser(new ProjectExplorer::MsvcParser);
+ parser.addLineParser(new ProjectExplorer::MsvcParser);
break;
}