Commit 6630857d authored by Daniel Teske's avatar Daniel Teske
Browse files

Fix add buildconfiguration not respecting default qmake build



Change-Id: Ic20b2842b10bf97c721df6d90b2306a813c9ba2a
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 89813779
......@@ -752,26 +752,31 @@ BuildConfiguration *Qt4BuildConfigurationFactory::create(ProjectExplorer::Target
return 0;
//: Debug build configuration. We recommend not translating it.
QString defaultDebugName = tr("%1 Debug").arg(version->displayName());
QString customDebugName;
QString defaultFirstName = tr("%1 Debug").arg(version->displayName());
QString customFirstName;
if (buildConfigurationName != version->displayName())
customDebugName = tr("%1 Debug").arg(buildConfigurationName);
BuildConfiguration *bc = qt4Target->addQt4BuildConfiguration(defaultDebugName, customDebugName,
version,
(version->defaultBuildConfig() | QtSupport::BaseQtVersion::DebugBuild),
QString(), QString(), false);
customFirstName = tr("%1 Debug").arg(buildConfigurationName);
//: Release build configuration. We recommend not translating it.
QString defaultReleaseName = tr("%1 Release").arg(version->displayName());
QString customReleaseName;
QString defaultSecondName = tr("%1 Release").arg(version->displayName());
QString customSecondName;
if (buildConfigurationName != version->displayName())
customReleaseName = tr("%1 Release").arg(buildConfigurationName);
customSecondName = tr("%1 Release").arg(buildConfigurationName);
if (!(version->defaultBuildConfig() & QtSupport::BaseQtVersion::DebugBuild)) {
qSwap(defaultFirstName, defaultSecondName);
qSwap(customFirstName, customSecondName);
}
bc = qt4Target->addQt4BuildConfiguration(defaultReleaseName, customReleaseName,
version,
(version->defaultBuildConfig() & ~QtSupport::BaseQtVersion::DebugBuild),
QString(), QString(), false);
BuildConfiguration *bc = qt4Target->addQt4BuildConfiguration(defaultFirstName, customFirstName,
version,
version->defaultBuildConfig(),
QString(), QString(), false);
qt4Target->addQt4BuildConfiguration(defaultSecondName, customSecondName,
version,
(version->defaultBuildConfig() ^ QtSupport::BaseQtVersion::DebugBuild),
QString(), QString(), false);
return bc;
}
......
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