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:
@@ -47,20 +47,12 @@ namespace Nim {
|
||||
|
||||
class NimParser : public ProjectExplorer::IOutputParser
|
||||
{
|
||||
public:
|
||||
void stdOutput(const QString &line) final
|
||||
void handleLine(const QString &line, Utils::OutputFormat type) override
|
||||
{
|
||||
parseLine(line.trimmed());
|
||||
IOutputParser::stdOutput(line);
|
||||
IOutputParser::handleLine(line, type);
|
||||
}
|
||||
|
||||
void stdError(const QString &line) final
|
||||
{
|
||||
parseLine(line.trimmed());
|
||||
IOutputParser::stdError(line);
|
||||
}
|
||||
|
||||
private:
|
||||
void parseLine(const QString &line)
|
||||
{
|
||||
static QRegularExpression regex("(.+.nim)\\((\\d+), (\\d+)\\) (.+)",
|
||||
|
||||
Reference in New Issue
Block a user