aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmakeproject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakeproject.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 3b0b3117ea5..d6eb593612e 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -307,18 +307,23 @@ bool CMakeProject::parseCMakeLists()
CPlusPlus::CppModelManagerInterface::instance();
if (modelmanager) {
CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelmanager->projectInfo(this);
- if (pinfo.includePaths != allIncludePaths
- || pinfo.sourceFiles != m_files
- || pinfo.defines != (activeBC->toolChain() ? activeBC->toolChain()->predefinedMacros() : QByteArray())
- || pinfo.frameworkPaths != allFrameworkPaths) {
- pinfo.includePaths = allIncludePaths;
+ if (pinfo.includePaths() != allIncludePaths
+ || pinfo.sourceFiles() != m_files
+ || pinfo.defines() != (activeBC->toolChain() ? activeBC->toolChain()->predefinedMacros(QStringList()) : QByteArray())
+ || pinfo.frameworkPaths() != allFrameworkPaths) {
+ pinfo.clearProjectParts();
+ CPlusPlus::CppModelManagerInterface::ProjectPart::Ptr part(
+ new CPlusPlus::CppModelManagerInterface::ProjectPart);
+ part->includePaths = allIncludePaths;
// TODO we only want C++ files, not all other stuff that might be in the project
- pinfo.sourceFiles = m_files;
- pinfo.defines = (activeBC->toolChain() ? activeBC->toolChain()->predefinedMacros() : QByteArray()); // TODO this is to simplistic
- pinfo.frameworkPaths = allFrameworkPaths;
+ part->sourceFiles = m_files;
+ part->defines = (activeBC->toolChain() ? activeBC->toolChain()->predefinedMacros(QStringList()) : QByteArray()); // TODO this is to simplistic
+ part->frameworkPaths = allFrameworkPaths;
+ part->language = CPlusPlus::CppModelManagerInterface::CXX;
+ pinfo.appendProjectPart(part);
modelmanager->updateProjectInfo(pinfo);
m_codeModelFuture.cancel();
- m_codeModelFuture = modelmanager->updateSourceFiles(pinfo.sourceFiles);
+ m_codeModelFuture = modelmanager->updateSourceFiles(m_files);
}
}
emit buildTargetsChanged();