summaryrefslogtreecommitdiff
path: root/src/plugins/cppeditor/cppquickfixes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cppeditor/cppquickfixes.cpp')
-rw-r--r--src/plugins/cppeditor/cppquickfixes.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/cppeditor/cppquickfixes.cpp b/src/plugins/cppeditor/cppquickfixes.cpp
index 6505989da9..7833f99099 100644
--- a/src/plugins/cppeditor/cppquickfixes.cpp
+++ b/src/plugins/cppeditor/cppquickfixes.cpp
@@ -1863,15 +1863,19 @@ public:
QList<CppModelManagerInterface::ProjectInfo> projectInfos = modelManager->projectInfos();
bool inProject = false;
foreach (const CppModelManagerInterface::ProjectInfo &info, projectInfos) {
- if (info.sourceFiles.contains(doc->fileName())) {
- inProject = true;
- includePaths += info.includePaths;
+ foreach (CppModelManagerInterface::ProjectPart::Ptr part, info.projectParts()) {
+ if (part->sourceFiles.contains(doc->fileName())) {
+ inProject = true;
+ includePaths += part->includePaths;
+ }
}
}
if (!inProject) {
// better use all include paths than none
- foreach (const CppModelManagerInterface::ProjectInfo &info, projectInfos)
- includePaths += info.includePaths;
+ foreach (const CppModelManagerInterface::ProjectInfo &info, projectInfos) {
+ foreach (CppModelManagerInterface::ProjectPart::Ptr part, info.projectParts())
+ includePaths += part->includePaths;
+ }
}
// find a include file through the locator