forked from qt-creator/qt-creator
ProjectExplorer: Move code to set up default project structure
Move the code used to set up the default project structure from the Project into the sessionmanager. Now that the models are no longer connected to the project this is the safer way as less change to the projects logic is required. Change-Id: Ib6b897f990a24d2dcce96a9821f090551fe45f13 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -417,13 +417,6 @@ void Project::setDocument(Core::IDocument *doc)
|
||||
QTC_ASSERT(doc, return);
|
||||
QTC_ASSERT(!d->m_document, return);
|
||||
d->m_document = doc;
|
||||
|
||||
if (!d->m_rootProjectNode) {
|
||||
auto newRoot = new ProjectNode(projectDirectory());
|
||||
newRoot->setDisplayName(displayName());
|
||||
newRoot->addNode(new FileNode(projectFilePath(), FileType::Project, false));
|
||||
setRootProjectNode(newRoot);
|
||||
}
|
||||
}
|
||||
|
||||
void Project::setRootProjectNode(ProjectNode *root)
|
||||
|
||||
Reference in New Issue
Block a user