Commit 7ec74147 authored by Mika Attila's avatar Mika Attila Committed by Daniel Teske
Browse files

ProjectExplorer: Fix name not queried on adding new build configuration

BuildSettingsWidget::createConfiguration() works with a BuildInfo
object borrowed from an IBuildConfigurationFactory, and uses it to create
a new build configuration.

The original BuildInfo object should not be permanently changed, as it's
only used here for creating the new build configuration.

Ideally, it should work on a clone of the buildinfo/factory, but that
would require adding and implementing a polymorphic clone method
for either class.

This commit works around this problem by restoring the original
displayName of the buildinfo after use.

Task-number: QTCREATORBUG-12955
Change-Id: Iccf2123c4377a39396860a1cfaa817a98dacebd4
Reviewed-by: default avatarDaniel Teske <>
parent e3bc7d19
......@@ -238,6 +238,7 @@ void BuildSettingsWidget::createConfiguration()
QAction *action = qobject_cast<QAction *>(sender());
BuildInfo *info = static_cast<BuildInfo *>(action->data().value<void*>());
QString originalDisplayName = info->displayName;
if (info->displayName.isEmpty()) {
bool ok = false;
......@@ -256,6 +257,7 @@ void BuildSettingsWidget::createConfiguration()
info->displayName = originalDisplayName;
void BuildSettingsWidget::cloneConfiguration()
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