From d465dd9f3bd7394883644e884ff3fb534e813c39 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 14 Feb 2022 12:15:36 +0100 Subject: [PATCH] ProjectExplorer: Linkify main diagnostic location in MSVC output parser Task-number: QTCREATORBUG-27056 Change-Id: Ide66fd1ee9c8312653146cfa4a17ec6f662a7949 Reviewed-by: Qt CI Bot Reviewed-by: Reviewed-by: David Schulz --- src/plugins/projectexplorer/msvcparser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/msvcparser.cpp b/src/plugins/projectexplorer/msvcparser.cpp index bdef83438ac..df9a21660fb 100644 --- a/src/plugins/projectexplorer/msvcparser.cpp +++ b/src/plugins/projectexplorer/msvcparser.cpp @@ -166,8 +166,8 @@ MsvcParser::Result MsvcParser::processCompileLine(const QString &line) QPair position = parseFileName(match.captured(1)); const FilePath filePath = absoluteFilePath(position.first); LinkSpecs linkSpecs; + addLinkSpecForAbsoluteFilePath(linkSpecs, filePath, position.second, match, 1); if (!m_lastTask.isNull() && line.contains("note: ")) { - addLinkSpecForAbsoluteFilePath(linkSpecs, filePath, position.second, match, 1); const int offset = std::accumulate(m_lastTask.details.cbegin(), m_lastTask.details.cend(), 0, [](int total, const QString &line) { return total + line.length() + 1;}); @@ -181,6 +181,7 @@ MsvcParser::Result MsvcParser::processCompileLine(const QString &line) m_lastTask = CompileTask(taskType(match.captured(2)), match.captured(3) + match.captured(4).trimmed(), // description filePath, position.second); + m_linkSpecs << linkSpecs; m_lines = 1; } return {Status::InProgress, linkSpecs};