diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index a9fc94c4f93..6c1f835bdad 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -539,14 +539,6 @@ void CMakeBuildConfiguration::handleParsingSucceeded() } project()->handleParsingSuccess(this); - - { - m_buildDirManager.resetData(); - } - - { - emitBuildTypeChanged(); - } } std::unique_ptr CMakeBuildConfiguration::generateProjectTree( diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp index bbfcd41f668..4fb6bd297a6 100644 --- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp @@ -269,6 +269,10 @@ void CMakeProject::updateProjectData(CMakeBuildConfiguration *bc) emit fileListChanged(); + emit bc->emitBuildTypeChanged(); + + bc->m_buildDirManager.resetData(); // Clear remaining data + qCDebug(cmakeProjectLog) << "All CMake project data up to date."; } diff --git a/src/plugins/cmakeprojectmanager/projecttreehelper.cpp b/src/plugins/cmakeprojectmanager/projecttreehelper.cpp index 668b2ce5d5e..46d0810b608 100644 --- a/src/plugins/cmakeprojectmanager/projecttreehelper.cpp +++ b/src/plugins/cmakeprojectmanager/projecttreehelper.cpp @@ -177,6 +177,8 @@ void addHeaderNodes(ProjectNode *root, QSet &seenHeaders, const QList &allFiles) { + QTC_ASSERT(root, return ); + if (root->isEmpty()) return;