Commit 6e6e756d authored by Erik Verbruggen's avatar Erik Verbruggen

C++: fixed source-to-project-part map calculation

When the information for a project is updated, the mapping was cleared
and only recalculated for the new project info. Thereby wiping out
the info for any previously added project.

Change-Id: Ic6999b9be07f8cb6b4638723e6c8c7d2d3ca52e7
Reviewed-by: default avatarErik Verbruggen <erik.verbruggen@nokia.com>
parent a6f90353
......@@ -934,11 +934,10 @@ void CppModelManager::updateProjectInfo(const ProjectInfo &pinfo)
m_srcToProjectPart.clear();
foreach (const ProjectPart::Ptr &projectPart, pinfo.projectParts()) {
foreach (const QString &sourceFile, projectPart->sourceFiles) {
m_srcToProjectPart[sourceFile].append(projectPart);
}
}
foreach (const ProjectInfo &projectInfo, m_projects.values())
foreach (const ProjectPart::Ptr &projectPart, projectInfo.projectParts())
foreach (const QString &sourceFile, projectPart->sourceFiles)
m_srcToProjectPart[sourceFile].append(projectPart);
}
QList<CppModelManager::ProjectPart::Ptr> CppModelManager::projectPart(const QString &fileName) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment