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

@@ -64,7 +64,7 @@ CMakeTarget::CMakeTarget(CMakeProject *parent) :
m_buildConfigurationFactory(new CMakeBuildConfigurationFactory(this)),
m_deployConfigurationFactory(new ProjectExplorer::DeployConfigurationFactory(this))
{
setDisplayName(displayNameForId(id()));
setDefaultDisplayName(displayNameForId(id()));
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
connect(parent, SIGNAL(buildTargetsChanged()), SLOT(updateRunConfigurations()));
}
@@ -100,11 +100,7 @@ QString CMakeTarget::defaultBuildDirectory() const
bool CMakeTarget::fromMap(const QVariantMap &map)
{
if (!Target::fromMap(map))
return false;
setDisplayName(displayNameForId(id()));
return true;
return Target::fromMap(map);
}
void CMakeTarget::updateRunConfigurations()
@@ -194,7 +190,7 @@ CMakeTarget *CMakeTargetFactory::create(ProjectExplorer::Project *parent, const
// Add default build configuration:
CMakeBuildConfiguration *bc(new CMakeBuildConfiguration(t));
bc->setDisplayName("all");
bc->setDefaultDisplayName("all");
ProjectExplorer::BuildStepList *buildSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
ProjectExplorer::BuildStepList *cleanSteps = bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);