forked from qt-creator/qt-creator
IOutputParser: Replace std{Out,Err} with a single parameterized function
Another step towards parser/formatter unification. Task-number: QTCREATORBUG-22665 Change-Id: I6de86b3aee2c54585cdd4b06d21b0ea67300aeac Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -118,22 +118,6 @@ CustomParser::CustomParser(const CustomParserSettings &settings)
|
||||
setSettings(settings);
|
||||
}
|
||||
|
||||
void CustomParser::stdError(const QString &line)
|
||||
{
|
||||
if (parseLine(line, CustomParserExpression::ParseStdErrChannel))
|
||||
return;
|
||||
|
||||
IOutputParser::stdError(line);
|
||||
}
|
||||
|
||||
void CustomParser::stdOutput(const QString &line)
|
||||
{
|
||||
if (parseLine(line, CustomParserExpression::ParseStdOutChannel))
|
||||
return;
|
||||
|
||||
IOutputParser::stdOutput(line);
|
||||
}
|
||||
|
||||
void CustomParser::setSettings(const CustomParserSettings &settings)
|
||||
{
|
||||
m_error = settings.error;
|
||||
@@ -145,6 +129,16 @@ Core::Id CustomParser::id()
|
||||
return Core::Id("ProjectExplorer.OutputParser.Custom");
|
||||
}
|
||||
|
||||
void CustomParser::handleLine(const QString &line, OutputFormat type)
|
||||
{
|
||||
const CustomParserExpression::CustomParserChannel channel = type == StdErrFormat
|
||||
? CustomParserExpression::ParseStdErrChannel
|
||||
: CustomParserExpression::ParseStdOutChannel;
|
||||
if (parseLine(line, channel))
|
||||
return;
|
||||
IOutputParser::handleLine(line, type);
|
||||
}
|
||||
|
||||
bool CustomParser::hasMatch(const QString &line, CustomParserExpression::CustomParserChannel channel,
|
||||
const CustomParserExpression &expression, Task::TaskType taskType)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user