aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Schulz <david.schulz@qt.io>2020-11-26 08:57:30 +0100
committerDavid Schulz <david.schulz@qt.io>2020-11-26 08:02:16 +0000
commit786c131beb49152f76c570df49f5d514e8110205 (patch)
tree1682b8c35cf9e22baf6b2410fe3116b7f8ff576e
parentb40dcf6d2968fe2dd542a24702a6d52eefbd80eb (diff)
ClangTools: compare file names host os case sensitive
Change-Id: I31b889ca5e722bd565bde9b742e24da39151e8bc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r--src/plugins/clangtools/documentclangtoolrunner.cpp21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/plugins/clangtools/documentclangtoolrunner.cpp b/src/plugins/clangtools/documentclangtoolrunner.cpp
index 0f5e4da958..1b3bf94539 100644
--- a/src/plugins/clangtools/documentclangtoolrunner.cpp
+++ b/src/plugins/clangtools/documentclangtoolrunner.cpp
@@ -150,22 +150,17 @@ static FileInfo getFileInfo(const Utils::FilePath &file, ProjectExplorer::Projec
QTC_ASSERT(projectFile.kind != CppTools::ProjectFile::Unsupported, continue);
if (projectFile.path == CppTools::CppModelManager::configurationFileName())
continue;
- if (file.toString() != projectFile.path)
+ const auto projectFilePath = Utils::FilePath::fromString(projectFile.path);
+ if (file != projectFilePath)
continue;
if (!projectFile.active)
continue;
- if (projectPart->buildTargetType != ProjectExplorer::BuildTargetType::Unknown) {
- // found the best candidate, early return
- return FileInfo(Utils::FilePath::fromString(projectFile.path),
- projectFile.kind,
- projectPart);
- }
- if (candidate.projectPart.isNull()) {
- // found at least something but keep looking for better candidates
- candidate = FileInfo(Utils::FilePath::fromString(projectFile.path),
- projectFile.kind,
- projectPart);
- }
+ // found the best candidate, early return
+ if (projectPart->buildTargetType != ProjectExplorer::BuildTargetType::Unknown)
+ return FileInfo(projectFilePath, projectFile.kind, projectPart);
+ // found something but keep looking for better candidates
+ if (candidate.projectPart.isNull())
+ candidate = FileInfo(projectFilePath, projectFile.kind, projectPart);
}
}