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:
@@ -35,8 +35,12 @@
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
|
||||
void LldParser::stdError(const QString &line)
|
||||
void LldParser::handleLine(const QString &line, Utils::OutputFormat type)
|
||||
{
|
||||
if (type != Utils::StdErrFormat) {
|
||||
IOutputParser::handleLine(line, type);
|
||||
return;
|
||||
}
|
||||
const QString trimmedLine = rightTrimmed(line);
|
||||
if (trimmedLine.contains("error:") && trimmedLine.contains("lld")) {
|
||||
emit addTask(CompileTask(Task::Error, trimmedLine));
|
||||
@@ -68,7 +72,7 @@ void LldParser::stdError(const QString &line)
|
||||
absoluteFilePath(file), lineNo));
|
||||
return;
|
||||
}
|
||||
IOutputParser::stdError(line);
|
||||
IOutputParser::handleLine(line, Utils::StdErrFormat);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
|
||||
Reference in New Issue
Block a user