forked from qt-creator/qt-creator
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:
@@ -43,15 +43,15 @@ namespace RemoteLinux {
|
||||
|
||||
using namespace Internal;
|
||||
|
||||
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(Target *target)
|
||||
: DeployConfiguration(target, genericDeployConfigurationId())
|
||||
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(Target *target, Core::Id id)
|
||||
: DeployConfiguration(target, id)
|
||||
{}
|
||||
|
||||
void RemoteLinuxDeployConfiguration::initialize()
|
||||
{
|
||||
stepList()->insertStep(0, new RemoteLinuxCheckForFreeDiskSpaceStep(stepList()));
|
||||
stepList()->insertStep(1, new RemoteLinuxKillAppStep(stepList()));
|
||||
stepList()->insertStep(2, new GenericDirectUploadStep(stepList()));
|
||||
stepList()->appendStep(new RemoteLinuxCheckForFreeDiskSpaceStep(stepList()));
|
||||
stepList()->appendStep(new RemoteLinuxKillAppStep(stepList()));
|
||||
stepList()->appendStep(new GenericDirectUploadStep(stepList()));
|
||||
}
|
||||
|
||||
NamedWidget *RemoteLinuxDeployConfiguration::createConfigWidget()
|
||||
@@ -68,10 +68,9 @@ namespace Internal {
|
||||
|
||||
RemoteLinuxDeployConfigurationFactory::RemoteLinuxDeployConfigurationFactory()
|
||||
{
|
||||
setObjectName("RemoteLinuxDeployConfiguration");
|
||||
registerDeployConfiguration<RemoteLinuxDeployConfiguration>
|
||||
(RemoteLinuxDeployConfiguration::genericDeployConfigurationId());
|
||||
setSupportedTargetDeviceTypes({RemoteLinux::Constants::GenericLinuxOsType});
|
||||
addSupportedTargetDeviceType(RemoteLinux::Constants::GenericLinuxOsType);
|
||||
setDefaultDisplayName(QCoreApplication::translate("RemoteLinux",
|
||||
"Deploy to Remote Linux Host"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user