Make DeployConfigurationFactory more similar to RunConfigFactories

This follows some of the recent changes to RunConfigurations:
- pass Id from factory to DeployConfiguration constructors
- de-object-ify DeployConfigurationFactory
- use addSupportedTargetDeviceType(Id) instead of
  addSupportedTargetDeviceType(List<Id>)

Also, use stepList()->appendStep() instead of stepList()->insertStep(pos...)
with manual pos tracking in some cases.

Change-Id: I09c6a9d0f66f9f85b1c13361104f7878028e1ea8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2018-04-30 16:50:51 +02:00
parent 8f6a560ed7
commit cf43803032
14 changed files with 56 additions and 89 deletions

View File

@@ -35,18 +35,15 @@
namespace QbsProjectManager {
namespace Internal {
const char QBS_DEPLOYCONFIG_ID[] = "Qbs.Deploy";
QbsDeployConfiguration::QbsDeployConfiguration(ProjectExplorer::Target *target) :
ProjectExplorer::DeployConfiguration(target, QBS_DEPLOYCONFIG_ID)
QbsDeployConfiguration::QbsDeployConfiguration(ProjectExplorer::Target *target, Core::Id id) :
ProjectExplorer::DeployConfiguration(target, id)
{
}
QbsDeployConfigurationFactory::QbsDeployConfigurationFactory()
{
setObjectName("QbsDeployConfiguration");
registerDeployConfiguration<QbsDeployConfiguration>(QBS_DEPLOYCONFIG_ID);
setSupportedTargetDeviceTypes({ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE});
registerDeployConfiguration<QbsDeployConfiguration>("Qbs.Deploy");
addSupportedTargetDeviceType(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
setSupportedProjectType(Constants::PROJECT_ID);
setDefaultDisplayName(QCoreApplication::translate("Qbs", "Qbs Install"));
}

View File

@@ -35,13 +35,11 @@ class QbsDeployConfiguration : public ProjectExplorer::DeployConfiguration
Q_OBJECT
public:
explicit QbsDeployConfiguration(ProjectExplorer::Target *target);
QbsDeployConfiguration(ProjectExplorer::Target *target, Core::Id id);
};
class QbsDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
{
Q_OBJECT
public:
QbsDeployConfigurationFactory();
};