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

@@ -52,7 +52,6 @@ const char * const BUILD_DIRECTORY_KEY("GenericProjectManager.GenericBuildConfig
GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent)
: BuildConfiguration(parent, QLatin1String(GENERIC_BC_ID))
{
}
GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent, const QString &id)

View File

@@ -84,8 +84,8 @@ GenericMakeStep::GenericMakeStep(ProjectExplorer::BuildStepList *parent, Generic
void GenericMakeStep::ctor()
{
setDisplayName(QCoreApplication::translate("GenericProjectManager::Internal::GenericMakeStep",
GENERIC_MS_DISPLAY_NAME));
setDefaultDisplayName(QCoreApplication::translate("GenericProjectManager::Internal::GenericMakeStep",
GENERIC_MS_DISPLAY_NAME));
}
GenericMakeStep::~GenericMakeStep()

View File

@@ -57,9 +57,8 @@ GenericTarget::GenericTarget(GenericProject *parent) :
m_buildConfigurationFactory(new GenericBuildConfigurationFactory(this)),
m_deployConfigurationFactory(new ProjectExplorer::DeployConfigurationFactory(this))
{
setDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
GENERIC_DESKTOP_TARGET_DISPLAY_NAME,
"Generic desktop target display name"));
setDefaultDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
GENERIC_DESKTOP_TARGET_DISPLAY_NAME));
setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon));
}
@@ -92,9 +91,6 @@ bool GenericTarget::fromMap(const QVariantMap &map)
if (!Target::fromMap(map))
return false;
setDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
GENERIC_DESKTOP_TARGET_DISPLAY_NAME,
"Generic desktop target display name"));
return true;
}