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:
@@ -40,8 +40,12 @@ QMakeParser::QMakeParser() : m_error(QLatin1String("^(.+):(\\d+):\\s(.+)$"))
|
||||
m_error.setMinimal(true);
|
||||
}
|
||||
|
||||
void QMakeParser::stdError(const QString &line)
|
||||
void QMakeParser::handleLine(const QString &line, OutputFormat type)
|
||||
{
|
||||
if (type != Utils::StdErrFormat) {
|
||||
IOutputParser::handleLine(line, type);
|
||||
return;
|
||||
}
|
||||
QString lne = rightTrimmed(line);
|
||||
if (m_error.indexIn(lne) > -1) {
|
||||
QString fileName = m_error.cap(1);
|
||||
@@ -78,7 +82,7 @@ void QMakeParser::stdError(const QString &line)
|
||||
emit addTask(BuildSystemTask(Task::Warning, description), 1);
|
||||
return;
|
||||
}
|
||||
IOutputParser::stdError(line);
|
||||
IOutputParser::handleLine(line, StdErrFormat);
|
||||
}
|
||||
|
||||
} // QmakeProjectManager
|
||||
|
||||
Reference in New Issue
Block a user