Commit deeed07c authored by Tobias Hunger's avatar Tobias Hunger

Qbs: Move setting up the build directory out of createBuildInfo

Change-Id: Ief088f880c866e8293c191194da05185f5df937a
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 0fb641c9
......@@ -241,12 +241,10 @@ bool QbsBuildConfigurationFactory::canHandle(const ProjectExplorer::Target *t) c
}
ProjectExplorer::BuildInfo *QbsBuildConfigurationFactory::createBuildInfo(const ProjectExplorer::Kit *k,
const Utils::FileName &buildDirectory,
ProjectExplorer::BuildConfiguration::BuildType type) const
{
QbsBuildInfo *info = new QbsBuildInfo(this);
info->typeName = tr("Build");
info->buildDirectory = buildDirectory;
info->kitId = k->id();
info->type = type;
info->supportsShadowBuild = true;
......@@ -264,8 +262,9 @@ QList<ProjectExplorer::BuildInfo *> QbsBuildConfigurationFactory::availableBuild
const Utils::FileName buildDirectory = QbsProject::defaultBuildDirectory(parent->project()->projectFilePath());
ProjectExplorer::BuildInfo *info = createBuildInfo(parent->kit(), buildDirectory,
ProjectExplorer::BuildInfo *info = createBuildInfo(parent->kit(),
ProjectExplorer::BuildConfiguration::Debug);
info->buildDirectory = buildDirectory;
result << info;
return result;
......@@ -283,14 +282,16 @@ QList<ProjectExplorer::BuildInfo *> QbsBuildConfigurationFactory::availableSetup
const Utils::FileName buildDirectory = QbsProject::defaultBuildDirectory(projectPath);
ProjectExplorer::BuildInfo *info = createBuildInfo(k, buildDirectory, ProjectExplorer::BuildConfiguration::Debug);
ProjectExplorer::BuildInfo *info = createBuildInfo(k, ProjectExplorer::BuildConfiguration::Debug);
//: The name of the debug build configuration created by default for a qbs project.
info->displayName = tr("Debug");
info->buildDirectory = buildDirectory;
result << info;
info = createBuildInfo(k, buildDirectory, ProjectExplorer::BuildConfiguration::Release);
info = createBuildInfo(k, ProjectExplorer::BuildConfiguration::Release);
//: The name of the release build configuration created by default for a qbs project.
info->displayName = tr("Release");
info->buildDirectory = buildDirectory;
result << info;
return result;
......
......@@ -128,7 +128,6 @@ public:
private:
bool canHandle(const ProjectExplorer::Target *t) const;
ProjectExplorer::BuildInfo *createBuildInfo(const ProjectExplorer::Kit *k,
const Utils::FileName &buildDirectory,
ProjectExplorer::BuildConfiguration::BuildType type) const;
};
......
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