forked from qt-creator/qt-creator
Make all projects generate a fresh project tree
Do not update the existing project tree anymore: Start a fresh one and throw the old one away. Change-Id: Ifabe293b6ca668b0672516a6d81acd5346d98fe5 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -215,13 +215,15 @@ QList<CMakeBuildTarget> CMakeBuildConfiguration::buildTargets() const
|
||||
return m_buildDirManager->buildTargets();
|
||||
}
|
||||
|
||||
void CMakeBuildConfiguration::generateProjectTree(CMakeListsNode *root,
|
||||
const QList<const FileNode*> &allFiles) const
|
||||
CMakeListsNode *
|
||||
CMakeBuildConfiguration::generateProjectTree(const QList<const FileNode*> &allFiles) const
|
||||
{
|
||||
auto root = new CMakeListsNode(target()->project()->projectFilePath());
|
||||
if (!m_buildDirManager || m_buildDirManager->isParsing())
|
||||
return;
|
||||
return nullptr;
|
||||
|
||||
m_buildDirManager->generateProjectTree(root, allFiles);
|
||||
return root;
|
||||
}
|
||||
|
||||
void CMakeBuildConfiguration::updateCodeModel(CppTools::RawProjectParts &rpps)
|
||||
|
||||
@@ -86,7 +86,7 @@ public:
|
||||
void clearCache();
|
||||
|
||||
QList<CMakeBuildTarget> buildTargets() const;
|
||||
void generateProjectTree(CMakeListsNode *root, const QList<const ProjectExplorer::FileNode *> &allFiles) const;
|
||||
CMakeListsNode *generateProjectTree(const QList<const ProjectExplorer::FileNode *> &allFiles) const;
|
||||
void updateCodeModel(CppTools::RawProjectParts &rpps);
|
||||
|
||||
static Utils::FileName
|
||||
|
||||
@@ -151,7 +151,9 @@ void CMakeProject::updateProjectData(CMakeBuildConfiguration *bc)
|
||||
|
||||
Kit *k = t->kit();
|
||||
|
||||
bc->generateProjectTree(static_cast<CMakeListsNode *>(rootProjectNode()), m_allFiles);
|
||||
auto newRoot = bc->generateProjectTree(m_allFiles);
|
||||
if (newRoot)
|
||||
setRootProjectNode(newRoot);
|
||||
|
||||
updateApplicationAndDeploymentTargets();
|
||||
updateTargetRunConfigurations(t);
|
||||
|
||||
Reference in New Issue
Block a user