forked from qt-creator/qt-creator
ProjectExplorer: Replace BuildConfigurationFactory::availableBuilds
... by a function object. Change-Id: I9953ba6915c0177e7c4067d36dd755fc2ba5cf84 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -76,22 +76,20 @@ GenericBuildConfigurationFactory::GenericBuildConfigurationFactory()
|
||||
|
||||
setSupportedProjectType(Constants::GENERICPROJECT_ID);
|
||||
setSupportedProjectMimeTypeName(Constants::GENERICMIMETYPE);
|
||||
}
|
||||
|
||||
QList<BuildInfo> GenericBuildConfigurationFactory::availableBuilds
|
||||
(const Kit *k, const FilePath &projectPath, bool forSetup) const
|
||||
{
|
||||
BuildInfo info(this);
|
||||
info.typeName = tr("Build");
|
||||
info.buildDirectory = forSetup ? Project::projectDirectory(projectPath) : projectPath;
|
||||
info.kitId = k->id();
|
||||
setBuildGenerator([this](const Kit *k, const FilePath &projectPath, bool forSetup) {
|
||||
BuildInfo info(this);
|
||||
info.typeName = tr("Build");
|
||||
info.buildDirectory = forSetup ? Project::projectDirectory(projectPath) : projectPath;
|
||||
info.kitId = k->id();
|
||||
|
||||
if (forSetup) {
|
||||
//: The name of the build configuration created by default for a generic project.
|
||||
info.displayName = tr("Default");
|
||||
}
|
||||
if (forSetup) {
|
||||
//: The name of the build configuration created by default for a generic project.
|
||||
info.displayName = tr("Default");
|
||||
}
|
||||
|
||||
return {info};
|
||||
return QList<BuildInfo>{info};
|
||||
});
|
||||
}
|
||||
|
||||
void GenericBuildConfiguration::addToEnvironment(Utils::Environment &env) const
|
||||
|
||||
Reference in New Issue
Block a user