Commit 4b39baa8 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

QbsProjectManager: Add project file nodes for sub-projects



They got lost somehow during the project tree refactoring.

Task-number: QTCREATORBUG-17859
Change-Id: I1d1178c3d0932322604e7035f15dcc4490309ca9
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann's avatarJoerg Bornemann <joerg.bornemann@qt.io>
parent b520a906
......@@ -133,6 +133,10 @@ buildProductNodeTree(const qbs::Project &project, const qbs::ProductData &prd)
void setupProjectNode(QbsProjectManager::Internal::QbsProjectNode *node, const qbs::ProjectData &prjData,
const qbs::Project &qbsProject)
{
using namespace QbsProjectManager::Internal;
node->addNode(new QbsFileNode(Utils::FileName::fromString(prjData.location().filePath()),
ProjectExplorer::FileType::Project, false,
prjData.location().line()));
foreach (const qbs::ProjectData &subData, prjData.subProjects()) {
auto subProject =
new QbsProjectManager::Internal::QbsProjectNode(
......@@ -189,9 +193,7 @@ namespace Internal {
QbsRootProjectNode *QbsNodeTreeBuilder::buildTree(QbsProject *project)
{
auto root = new QbsRootProjectNode(project);
root->addNode(new ProjectExplorer::FileNode(project->projectFilePath(),
ProjectExplorer::FileType::Project, false));
setupProjectNode(root, project->qbsProjectData(), project->qbsProject());
auto buildSystemFiles
= new ProjectExplorer::FolderNode(project->projectDirectory(),
ProjectExplorer::NodeType::Folder,
......@@ -206,7 +208,6 @@ QbsRootProjectNode *QbsNodeTreeBuilder::buildTree(QbsProject *project)
buildSystemFiles->compress();
root->addNode(buildSystemFiles);
setupProjectNode(root, project->qbsProjectData(), project->qbsProject());
return root;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment