ProjectExplorer: Let IOutputParser handle newlines

This makes IOutputParser structurally more similar to
Utils::OutputFormatter, which makes it simpler to explore possibilities
of somehow uniting these two related classes.

Task-number: QTCREATORBUG-22665
Change-Id: Ibb12ab6c8c785d863b9a921102a929864d0a5251
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2020-03-31 14:34:08 +02:00
parent 45e7b78dc3
commit b15d1951a2
8 changed files with 138 additions and 118 deletions

View File

@@ -383,11 +383,11 @@ void QbsBuildStep::handleProcessResult(
emit addOutput(executable.toUserOutput() + ' ' + QtcProcess::joinArgs(arguments),
OutputFormat::Stdout);
for (const QString &line : stdErr) {
m_parser->stdError(line);
m_parser->handleStderr(line + '\n');
emit addOutput(line, OutputFormat::Stderr);
}
for (const QString &line : stdOut) {
m_parser->stdOutput(line);
m_parser->handleStdout(line + '\n');
emit addOutput(line, OutputFormat::Stdout);
}
m_parser->flush();