DeployConfiguration *RemoteLinuxDeployConfigurationFactory::create(Target *parent, const QString &id) { Q_ASSERT(canCreate(parent, id)); DeployConfiguration * const dc = new RemoteLinuxDeployConfiguration(parent, id, genericLinuxDisplayName(), QLatin1String(Constants::GenericLinuxOsType)); dc->stepList()->insertStep(0, new TarPackageCreationStep(dc->stepList())); dc->stepList()->insertStep(1, new UploadAndInstallTarPackageStep(dc->stepList())); return dc; }
DeployConfiguration *RemoteLinuxDeployConfigurationFactory::create(Target *parent, const Core::Id id) { Q_ASSERT(canCreate(parent, id)); DeployConfiguration * const dc = new RemoteLinuxDeployConfiguration(parent, id, genericLinuxDisplayName()); dc->stepList()->insertStep(0, new RemoteLinuxCheckForFreeDiskSpaceStep(dc->stepList())); dc->stepList()->insertStep(1, new GenericDirectUploadStep(dc->stepList(), GenericDirectUploadStep::stepId())); return dc; }
DeployConfiguration *RemoteLinuxDeployConfigurationFactory::restore(Target *parent, const QVariantMap &map) { if (!canRestore(parent, map)) return 0; QString id = idFromMap(map); RemoteLinuxDeployConfiguration * const dc = new RemoteLinuxDeployConfiguration(parent, id, genericLinuxDisplayName(), QLatin1String(Constants::GenericLinuxOsType)); if (!dc->fromMap(map)) { delete dc; return 0; } return dc; }
DeployConfiguration *RemoteLinuxDeployConfigurationFactory::restore(Target *parent, const QVariantMap &map) { if (!canRestore(parent, map)) return 0; Core::Id id = idFromMap(map); RemoteLinuxDeployConfiguration * const dc = new RemoteLinuxDeployConfiguration(parent, id, genericLinuxDisplayName()); if (!dc->fromMap(map)) { delete dc; return 0; } return dc; }
QString RemoteLinuxDeployConfigurationFactory::displayNameForId(const QString &id) const { if (id == genericDeployConfigurationId()) return genericLinuxDisplayName(); return QString(); }