forked from qt-creator/qt-creator
ProjectExplorer: Use a functor for BuildSystem creation
... instead of creating the BuildSystem direct. This will help the shift of BuildSystem owner ship as a Project will have potentially multiple BuildSystem instances (one per BuildConfiguration), but still be responsible for creating them with the Targets. Change-Id: I2dd71c7687ed41af9e42c874b3f932ce704e7ee3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -888,10 +888,9 @@ Utils::Environment Project::activeParseEnvironment() const
|
||||
return result;
|
||||
}
|
||||
|
||||
void Project::setBuildSystem(std::unique_ptr<BuildSystem> &&bs)
|
||||
void Project::setBuildSystemCreator(const std::function<BuildSystem *(Project *)> &creator)
|
||||
{
|
||||
QTC_ASSERT(!bs->parent(), bs->setParent(nullptr));
|
||||
d->m_buildSystem = std::move(bs);
|
||||
d->m_buildSystem.reset(creator(this));
|
||||
}
|
||||
|
||||
Core::Context Project::projectContext() const
|
||||
|
||||
Reference in New Issue
Block a user