Add convenience functions for creating ProjectExplorer::HeaderPaths

Change-Id: I7b1f63caca6b70ba4ec1b1870b83cbf20aa6564a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2021-08-24 15:30:04 +02:00
parent 5805208cec
commit 25ff15a1fb
22 changed files with 116 additions and 122 deletions

View File

@@ -496,8 +496,8 @@ bool ClangCompletionAssistProcessor::completeInclude(const QTextCursor &cursor)
// Make completion for all relevant includes
ProjectExplorer::HeaderPaths headerPaths = m_interface->headerPaths();
const ProjectExplorer::HeaderPath currentFilePath(m_interface->filePath().toFileInfo().path(),
ProjectExplorer::HeaderPathType::User);
const auto currentFilePath = ProjectExplorer::HeaderPath::makeUser(
m_interface->filePath().toFileInfo().path());
if (!headerPaths.contains(currentFilePath))
headerPaths.append(currentFilePath);