forked from qt-creator/qt-creator
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:
@@ -151,12 +151,14 @@ static void parse(QFutureInterface<void> &future, const QString &output,
|
||||
|
||||
void ParseIssuesDialog::accept()
|
||||
{
|
||||
std::unique_ptr<IOutputParser> parser(d->kitChooser.currentKit()->createOutputParser());
|
||||
if (!parser) {
|
||||
const QList<IOutputParser *> lineParsers = d->kitChooser.currentKit()->createOutputParsers();
|
||||
if (lineParsers.isEmpty()) {
|
||||
QMessageBox::critical(this, tr("Cannot Parse"), tr("Cannot parse: The chosen kit does "
|
||||
"not provide an output parser."));
|
||||
return;
|
||||
}
|
||||
std::unique_ptr<IOutputParser> parser(new IOutputParser);
|
||||
parser->setLineParsers(lineParsers);
|
||||
if (d->clearTasksCheckBox.isChecked())
|
||||
TaskHub::clearTasks();
|
||||
connect(parser.get(), &IOutputParser::addTask, [](const Task &t) { TaskHub::addTask(t); });
|
||||
|
||||
Reference in New Issue
Block a user