forked from qt-creator/qt-creator
CppTools: Use only const pointers for ProjectInfo and ProjectPart
All members were already const, but this makes it clear at all points of use that these data structures are immutable. Change-Id: Iea615c090bde462c445d15223caccc561b0c713d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -1913,11 +1913,11 @@ ProjectExplorer::HeaderPaths relevantHeaderPaths(const QString &filePath)
|
||||
ProjectExplorer::HeaderPaths headerPaths;
|
||||
|
||||
CppModelManager *modelManager = CppModelManager::instance();
|
||||
const QList<ProjectPart::Ptr> projectParts = modelManager->projectPart(filePath);
|
||||
const QList<ProjectPart::ConstPtr> projectParts = modelManager->projectPart(filePath);
|
||||
if (projectParts.isEmpty()) { // Not part of any project, better use all include paths than none
|
||||
headerPaths += modelManager->headerPaths();
|
||||
} else {
|
||||
foreach (const ProjectPart::Ptr &part, projectParts)
|
||||
foreach (const ProjectPart::ConstPtr &part, projectParts)
|
||||
headerPaths += part->headerPaths;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user