Expand CurrentBuild:Type in the wizards

This was just unset before.

Task-number: QTCREATORBUG-15178
Change-Id: Ice66273e2ce9bc60bd8a96516f774201a7a95331
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-10-22 17:26:33 +02:00
parent 6346835740
commit aface7b1d6
9 changed files with 49 additions and 22 deletions

View File

@@ -75,13 +75,15 @@ namespace QmakeProjectManager {
// Helpers:
// --------------------------------------------------------------------
QString QmakeBuildConfiguration::shadowBuildDirectory(const QString &proFilePath, const Kit *k, const QString &suffix)
QString QmakeBuildConfiguration::shadowBuildDirectory(const QString &proFilePath, const Kit *k,
const QString &suffix,
BuildConfiguration::BuildType buildType)
{
if (proFilePath.isEmpty())
return QString();
const QString projectName = QFileInfo(proFilePath).completeBaseName();
ProjectMacroExpander expander(projectName, k, suffix);
ProjectMacroExpander expander(projectName, k, suffix, buildType);
QString projectDir = Project::projectDirectory(FileName::fromString(proFilePath)).toString();
QString buildPath = expander.expand(Core::DocumentManager::buildDirectory());
return FileUtils::resolvePath(projectDir, buildPath);
@@ -89,9 +91,11 @@ QString QmakeBuildConfiguration::shadowBuildDirectory(const QString &proFilePath
static Utils::FileName defaultBuildDirectory(const QString &projectPath,
const ProjectExplorer::Kit *k,
const QString &suffix)
const QString &suffix,
BuildConfiguration::BuildType type)
{
return Utils::FileName::fromString(QmakeBuildConfiguration::shadowBuildDirectory(projectPath, k, suffix));
return Utils::FileName::fromString(QmakeBuildConfiguration::shadowBuildDirectory(projectPath, k,
suffix, type));
}
const char QMAKE_BC_ID[] = "Qt4ProjectManager.Qt4BuildConfiguration";
@@ -597,7 +601,7 @@ QmakeBuildInfo *QmakeBuildConfigurationFactory::createBuildInfo(const Kit *k,
info->buildDirectory = Utils::FileName::fromString(absoluteBuildPath);
} else {
info->buildDirectory = defaultBuildDirectory(projectPath, k, suffix);
info->buildDirectory = defaultBuildDirectory(projectPath, k, suffix, type);
}
info->buildType = type;
return info;
@@ -690,7 +694,7 @@ void QmakeBuildConfigurationFactory::configureBuildConfiguration(Target *parent,
Utils::FileName directory = qmakeInfo->buildDirectory;
if (directory.isEmpty()) {
directory = defaultBuildDirectory(parent->project()->projectFilePath().toString(),
parent->kit(), qmakeInfo->displayName);
parent->kit(), qmakeInfo->displayName, bc->buildType());
}
bc->setBuildDirectory(directory);