summaryrefslogtreecommitdiff
path: root/src/plugins/genericprojectmanager/genericproject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/genericprojectmanager/genericproject.cpp')
-rw-r--r--src/plugins/genericprojectmanager/genericproject.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp
index df458b1284..c1b2adb185 100644
--- a/src/plugins/genericprojectmanager/genericproject.cpp
+++ b/src/plugins/genericprojectmanager/genericproject.cpp
@@ -257,30 +257,33 @@ void GenericProject::refresh(RefreshOptions options)
if (modelManager) {
CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this);
+ pinfo.clearProjectParts();
+ CPlusPlus::CppModelManagerInterface::ProjectPart::Ptr part(
+ new CPlusPlus::CppModelManagerInterface::ProjectPart);
if (m_toolChain) {
- pinfo.defines = m_toolChain->predefinedMacros();
- pinfo.defines += '\n';
+ part->defines = m_toolChain->predefinedMacros(QStringList());
+ part->defines += '\n';
foreach (const HeaderPath &headerPath, m_toolChain->systemHeaderPaths()) {
if (headerPath.kind() == HeaderPath::FrameworkHeaderPath)
- pinfo.frameworkPaths.append(headerPath.path());
+ part->frameworkPaths.append(headerPath.path());
else
- pinfo.includePaths.append(headerPath.path());
+ part->includePaths.append(headerPath.path());
}
}
- pinfo.includePaths += allIncludePaths();
- pinfo.defines += m_defines;
+ part->includePaths += allIncludePaths();
+ part->defines += m_defines;
// ### add _defines.
- pinfo.sourceFiles = files();
- pinfo.sourceFiles += generated();
+ part->sourceFiles = files();
+ part->sourceFiles += generated();
QStringList filesToUpdate;
if (options & Configuration) {
- filesToUpdate = pinfo.sourceFiles;
+ filesToUpdate = part->sourceFiles;
filesToUpdate.append(QLatin1String("<configuration>")); // XXX don't hardcode configuration file name
// Full update, if there's a code model update, cancel it
m_codeModelFuture.cancel();
@@ -291,6 +294,8 @@ void GenericProject::refresh(RefreshOptions options)
filesToUpdate.append(newFileList.toList());
}
+ pinfo.appendProjectPart(part);
+
modelManager->updateProjectInfo(pinfo);
m_codeModelFuture = modelManager->updateSourceFiles(filesToUpdate);
}