ProjectExplorer: Create initial project tree

Create an initial project tree with a ProjectNode and a FileNode for
the project file itself.

Fix the Projects to not implement their own tree before they have
better data.

Change-Id: I147ccd5603d22d1d60880a97f30fd8c271eac88c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2017-03-03 17:10:00 +01:00
parent 2fde3fffa9
commit 49fef0ae24
15 changed files with 35 additions and 47 deletions

View File

@@ -117,7 +117,6 @@ private:
// --------------------------------------------------------------------
QbsProject::QbsProject(const FileName &fileName) :
m_projectName(fileName.toFileInfo().completeBaseName()),
m_qbsProjectParser(0),
m_qbsUpdateFutureInterface(0),
m_parsingScheduled(false),
@@ -131,9 +130,6 @@ QbsProject::QbsProject(const FileName &fileName) :
setId(Constants::PROJECT_ID);
setDocument(new QbsProjectFile(this, fileName));
DocumentManager::addDocument(document());
auto newRoot = new QbsRootProjectNode(this);
Internal::QbsNodeTreeBuilder::buildTree(this); // Populate with initial data
setRootProjectNode(newRoot);
setProjectContext(Context(Constants::PROJECT_ID));
setProjectLanguages(Context(ProjectExplorer::Constants::CXX_LANGUAGE_ID));
@@ -166,7 +162,7 @@ QbsProject::~QbsProject()
QString QbsProject::displayName() const
{
return m_projectName;
return projectFilePath().toFileInfo().completeBaseName();
}
QbsRootProjectNode *QbsProject::rootProjectNode() const