Qbs: Make QbsNodeTreeBuilder handled uninitialized project

Make QbsNodeTreeBuilder handle uninitialized projects more gracefully.

Return a nullptr, so that the ContainerNode with the main project file
is used in that case.

Change-Id: I7ab90231c3fc24b7b676326f98f79c4b79018327
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Tobias Hunger
2017-04-27 11:45:06 +02:00
parent b5c3bd7a64
commit 72f769c9ba

View File

@@ -192,6 +192,9 @@ namespace Internal {
QbsRootProjectNode *QbsNodeTreeBuilder::buildTree(QbsProject *project)
{
if (!project->qbsProjectData().isValid())
return nullptr;
auto root = new QbsRootProjectNode(project);
setupProjectNode(root, project->qbsProjectData(), project->qbsProject());
auto buildSystemFiles