ClangTools: compare file names host os case sensitive

Change-Id: I31b889ca5e722bd565bde9b742e24da39151e8bc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
David Schulz
2020-11-26 08:57:30 +01:00
parent b40dcf6d29
commit 786c131beb

View File

@@ -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);
}
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);
}
}