diff options
Diffstat (limited to 'src/plugins/nim/project/nimblebuildstep.cpp')
-rw-r--r-- | src/plugins/nim/project/nimblebuildstep.cpp | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/plugins/nim/project/nimblebuildstep.cpp b/src/plugins/nim/project/nimblebuildstep.cpp index eb7a31f07a..36efa46313 100644 --- a/src/plugins/nim/project/nimblebuildstep.cpp +++ b/src/plugins/nim/project/nimblebuildstep.cpp @@ -45,15 +45,9 @@ namespace { class NimParser : public IOutputParser { -private: - void handleLine(const QString &line, Utils::OutputFormat type) override - { - parseLine(line.trimmed()); - IOutputParser::handleLine(line, type); - } - - void parseLine(const QString &line) + Status doHandleLine(const QString &lne, Utils::OutputFormat) override { + const QString line = lne.trimmed(); static QRegularExpression regex("(.+.nim)\\((\\d+), (\\d+)\\) (.+)", QRegularExpression::OptimizeOnFirstUsageOption); static QRegularExpression warning("(Warning):(.*)", @@ -63,13 +57,13 @@ private: QRegularExpressionMatch match = regex.match(line); if (!match.hasMatch()) - return; + return Status::NotHandled; const QString filename = match.captured(1); bool lineOk = false; const int lineNumber = match.captured(2).toInt(&lineOk); const QString message = match.captured(4); if (!lineOk) - return; + return Status::NotHandled; Task::TaskType type = Task::Unknown; @@ -78,10 +72,11 @@ private: else if (error.match(message).hasMatch()) type = Task::Error; else - return; + return Status::NotHandled; emit addTask(CompileTask(type, message, absoluteFilePath(FilePath::fromUserInput(filename)), lineNumber)); + return Status::Done; } }; |