forked from qt-creator/qt-creator
ProjectExplorer: Dissolve the AnsiFilterParser class
This class was different from all the other output parsers in that its only responsibility was to pre-process the output before it was passed to the real parsers. We now make this explicit by introducing the concept of a filter function and turning the AnsiFilterParser class into one of those. This also gets rid of a case where the order of output parsers in the chain matters, which we want to move away from. Task-number: QTCREATORBUG-22665 Change-Id: Ica135e54ab43cf2ca8186073dc2487c906d4b38d Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -136,10 +136,10 @@ AbstractProcessStep::~AbstractProcessStep()
|
||||
|
||||
void AbstractProcessStep::setOutputParser(IOutputParser *parser)
|
||||
{
|
||||
d->m_outputParserChain.reset(new AnsiFilterParser);
|
||||
d->m_outputParserChain->appendOutputParser(parser);
|
||||
|
||||
connect(d->m_outputParserChain.get(), &IOutputParser::addTask, this, &AbstractProcessStep::taskAdded);
|
||||
parser->addFilter(&Internal::filterAnsiEscapeCodes);
|
||||
d->m_outputParserChain.reset(parser);
|
||||
connect(d->m_outputParserChain.get(), &IOutputParser::addTask,
|
||||
this, &AbstractProcessStep::taskAdded);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user