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>
This commit is contained in:
Christian Kandeler
2020-04-08 17:45:39 +02:00
parent fa517bd72a
commit 45ba9fcd53
78 changed files with 807 additions and 931 deletions

View File

@@ -129,14 +129,14 @@ Core::Id CustomParser::id()
return Core::Id("ProjectExplorer.OutputParser.Custom");
}
void CustomParser::handleLine(const QString &line, OutputFormat type)
IOutputParser::Status CustomParser::doHandleLine(const QString &line, OutputFormat type)
{
const CustomParserExpression::CustomParserChannel channel = type == StdErrFormat
? CustomParserExpression::ParseStdErrChannel
: CustomParserExpression::ParseStdOutChannel;
if (parseLine(line, channel))
return;
IOutputParser::handleLine(line, type);
return Status::Done;
return Status::NotHandled;
}
bool CustomParser::hasMatch(const QString &line, CustomParserExpression::CustomParserChannel channel,
@@ -467,7 +467,7 @@ void ProjectExplorerPlugin::testCustomOutputParsers()
parser->skipFileExistsCheck();
OutputParserTester testbench;
testbench.appendOutputParser(parser);
testbench.addLineParser(parser);
testbench.testParsing(input, inputChannel,
tasks, childStdOutLines, childStdErrLines,
outputLines);