Enable restoring the default names of project configuration items

* Enable support for this in all ProjectConfiguration items
   (Targets, projects, BCs, DCs, RCs, etc.). This is nicer
   than having custom code in individual configuraiton items.

Reviewed-by: dt
This commit is contained in:
Tobias Hunger
2010-08-19 12:26:21 +02:00
parent b6f1dbeeb0
commit 616a9b13f0
37 changed files with 191 additions and 146 deletions

View File

@@ -163,9 +163,7 @@ void Qt4RunConfiguration::proFileUpdate(Qt4ProjectManager::Internal::Qt4ProFileN
void Qt4RunConfiguration::ctor()
{
QString name = defaultDisplayName();
if (name != displayName())
setDisplayName(name);
setDefaultDisplayName(defaultDisplayName());
connect(qt4Target(), SIGNAL(environmentChanged()),
this, SIGNAL(baseEnvironmentChanged()));
@@ -456,7 +454,6 @@ bool Qt4RunConfiguration::fromMap(const QVariantMap &map)
m_userEnvironmentChanges = ProjectExplorer::EnvironmentItem::fromStringList(map.value(QLatin1String(USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
m_baseEnvironmentBase = static_cast<BaseEnvironmentBase>(map.value(QLatin1String(BASE_ENVIRONMENT_BASE_KEY), static_cast<int>(Qt4RunConfiguration::BuildEnvironmentBase)).toInt());
// This will restore the display name for us:
return RunConfiguration::fromMap(map);
}