ProjectExplorer: Remove registerDeployConfiguration

Since the types are all the same now, no template is needed, and
effectively only m_configBaseId is set, so rename the function
accordingly.

Change-Id: I79bbf488a0549d78b6f3f0408e6744f71a5dc190
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-01-18 15:41:29 +01:00
parent 0949d09db7
commit 537a4ba285
8 changed files with 21 additions and 23 deletions

View File

@@ -179,6 +179,17 @@ void DeployConfigurationFactory::setUseDeploymentDataView()
m_configWidgetCreator = [](Target *target) { return new DeploymentDataView(target); };
}
void DeployConfigurationFactory::setConfigBaseId(Core::Id deployConfigBaseId)
{
m_creator = [this, deployConfigBaseId](Target *t) {
auto dc = new DeployConfiguration(t, deployConfigBaseId);
dc->setDefaultDisplayName(m_defaultDisplayName);
dc->m_configWidgetCreator = m_configWidgetCreator;
return dc;
};
m_deployConfigBaseId = deployConfigBaseId;
}
bool DeployConfigurationFactory::canCreate(Target *parent, Core::Id id) const
{
if (!canHandle(parent))
@@ -265,7 +276,7 @@ void DeployConfigurationFactory::addInitialStep(Core::Id stepId, const std::func
DefaultDeployConfigurationFactory::DefaultDeployConfigurationFactory()
{
registerDeployConfiguration<DeployConfiguration>("ProjectExplorer.DefaultDeployConfiguration");
setConfigBaseId("ProjectExplorer.DefaultDeployConfiguration");
addSupportedTargetDeviceType(Constants::DESKTOP_DEVICE_TYPE);
//: Display name of the default deploy configuration
setDefaultDisplayName(DeployConfiguration::tr("Deploy Configuration"));