diff options
author | David Schulz <[email protected]> | 2021-05-28 12:37:35 +0200 |
---|---|---|
committer | David Schulz <[email protected]> | 2021-06-09 06:57:42 +0000 |
commit | 0cfe27a53d6f3ccf231e4c05069c0bbe72286757 (patch) | |
tree | 84a8b4e9f1c782738f3fb4bd4c3b2df732bd2bd8 /src/plugins/clangtools/clangtoolslogfilereader.cpp | |
parent | 27f8e2dbce774410c5443a7f425eb53c2a869f54 (diff) |
Debugger: filepathify DiagnosticLocation
Change-Id: Ibbbf137231b313ec10e3d57c0230217b0c1e0a6c
Reviewed-by: hjk <[email protected]>
Diffstat (limited to 'src/plugins/clangtools/clangtoolslogfilereader.cpp')
-rw-r--r-- | src/plugins/clangtools/clangtoolslogfilereader.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/plugins/clangtools/clangtoolslogfilereader.cpp b/src/plugins/clangtools/clangtoolslogfilereader.cpp index 96ec0da16c0..f74884d25a2 100644 --- a/src/plugins/clangtools/clangtoolslogfilereader.cpp +++ b/src/plugins/clangtools/clangtoolslogfilereader.cpp @@ -155,16 +155,16 @@ public: int extraOffset = 0) : m_node(node) , m_fileCache(fileCache) - , m_filePath(QDir::cleanPath(asString(node["FilePath"]))) + , m_filePath(Utils::FilePath::fromUserInput(asString(node["FilePath"]))) , m_fileOffsetKey(fileOffsetKey) , m_extraOffset(extraOffset) {} - QString filePath() const { return m_filePath; } + Utils::FilePath filePath() const { return m_filePath; } Debugger::DiagnosticLocation toDiagnosticLocation() const { - FileCache::Item &cacheItem = m_fileCache.item(m_filePath); + FileCache::Item &cacheItem = m_fileCache.item(m_filePath.toString()); const QByteArray fileContents = cacheItem.fileContents(); const char *data = fileContents.data(); @@ -205,7 +205,7 @@ public: private: const YAML::Node &m_node; FileCache &m_fileCache; - QString m_filePath; + Utils::FilePath m_filePath; const char *m_fileOffsetKey = nullptr; int m_extraOffset = 0; }; @@ -232,10 +232,8 @@ Diagnostics readExportedDiagnostics(const Utils::FilePath &logFilePath, Location loc(node, fileCache); if (loc.filePath().isEmpty()) continue; - if (acceptFromFilePath - && !acceptFromFilePath(Utils::FilePath::fromString(loc.filePath()))) { + if (acceptFromFilePath && !acceptFromFilePath(loc.filePath())) continue; - } Diagnostic diag; diag.location = loc.toDiagnosticLocation(); |