diff options
Diffstat (limited to 'src/plugins/autotoolsprojectmanager/autotoolsproject.cpp')
-rw-r--r-- | src/plugins/autotoolsprojectmanager/autotoolsproject.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp index 015a303001..e6fd4e7d3d 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp @@ -513,19 +513,23 @@ void AutotoolsProject::updateCppCodeModel() CPlusPlus::CppModelManagerInterface::ProjectInfo pinfo = modelManager->projectInfo(this); - const bool update = (pinfo.includePaths != allIncludePaths) - || (pinfo.sourceFiles != m_files) - || (pinfo.defines != m_toolChain->predefinedMacros()) - || (pinfo.frameworkPaths != allFrameworkPaths); + const bool update = (pinfo.includePaths() != allIncludePaths) + || (pinfo.sourceFiles() != m_files) + || (pinfo.defines() != m_toolChain->predefinedMacros(QStringList())) + || (pinfo.frameworkPaths() != allFrameworkPaths); if (update) { - pinfo.includePaths = allIncludePaths; - pinfo.sourceFiles = m_files; + pinfo.clearProjectParts(); + CPlusPlus::CppModelManagerInterface::ProjectPart::Ptr part( + new CPlusPlus::CppModelManagerInterface::ProjectPart); + part->includePaths = allIncludePaths; + part->sourceFiles = m_files; if (m_toolChain) - pinfo.defines = m_toolChain->predefinedMacros(); - pinfo.frameworkPaths = allFrameworkPaths; + part->defines = m_toolChain->predefinedMacros(QStringList()); + part->frameworkPaths = allFrameworkPaths; + part->language = CPlusPlus::CppModelManagerInterface::CXX; + pinfo.appendProjectPart(part); + modelManager->updateProjectInfo(pinfo); - modelManager->updateSourceFiles(pinfo.sourceFiles); + modelManager->updateSourceFiles(m_files); } - - modelManager->updateProjectInfo(pinfo); } |