forked from qt-creator/qt-creator
RemoteLinux: Dissolve AbstractRemoteLinuxDeployStep::createDeployService
The previous setup doesn't buy much in comparison to new + setDeployService() combo. Making that explicit now opens the path to simplify the two-phase creation (i.e. move setInternalInitializer to the service c'tor). Change-Id: Ib66c7d02efcddd6909fe612a786034e2728cdedf Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -92,7 +92,8 @@ public:
|
||||
QdbMakeDefaultAppStep(BuildStepList *bsl, Id id)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<QdbMakeDefaultAppService>();
|
||||
auto service = new QdbMakeDefaultAppService;
|
||||
setDeployService(service);
|
||||
|
||||
auto selection = addAspect<SelectionAspect>();
|
||||
selection->setSettingsKey("QdbMakeDefaultDeployStep.MakeDefault");
|
||||
|
||||
@@ -115,7 +115,8 @@ public:
|
||||
QdbStopApplicationStep(BuildStepList *bsl, Id id)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<QdbStopApplicationService>();
|
||||
auto service = new QdbStopApplicationService;
|
||||
setDeployService(service);
|
||||
|
||||
setWidgetExpandedByDefault(false);
|
||||
|
||||
|
||||
@@ -32,17 +32,9 @@ protected:
|
||||
|
||||
void setInternalInitializer(const std::function<CheckResult()> &init);
|
||||
void setRunPreparer(const std::function<void()> &prep);
|
||||
|
||||
template <class T>
|
||||
T *createDeployService()
|
||||
{
|
||||
T *service = new T;
|
||||
setDeployService(service);
|
||||
return service;
|
||||
}
|
||||
void setDeployService(AbstractRemoteLinuxDeployService *service);
|
||||
|
||||
private:
|
||||
void setDeployService(AbstractRemoteLinuxDeployService *service);
|
||||
void handleProgressMessage(const QString &message);
|
||||
void handleErrorMessage(const QString &message);
|
||||
void handleWarningMessage(const QString &message);
|
||||
|
||||
@@ -92,7 +92,8 @@ public:
|
||||
CustomCommandDeployStep(BuildStepList *bsl, Id id)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<CustomCommandDeployService>();
|
||||
auto service = new CustomCommandDeployService;
|
||||
setDeployService(service);
|
||||
|
||||
auto commandLine = addAspect<StringAspect>();
|
||||
commandLine->setSettingsKey("RemoteLinuxCustomCommandDeploymentStep.CommandLine");
|
||||
|
||||
@@ -20,7 +20,8 @@ GenericDirectUploadStep::GenericDirectUploadStep(BuildStepList *bsl, Utils::Id i
|
||||
bool offerIncrementalDeployment)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<GenericDirectUploadService>();
|
||||
auto service = new GenericDirectUploadService;
|
||||
setDeployService(service);
|
||||
|
||||
BoolAspect *incremental = nullptr;
|
||||
if (offerIncrementalDeployment) {
|
||||
|
||||
@@ -106,7 +106,8 @@ class KillAppStep : public AbstractRemoteLinuxDeployStep
|
||||
public:
|
||||
KillAppStep(BuildStepList *bsl, Id id) : AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<Internal::KillAppService>();
|
||||
auto service = new Internal::KillAppService;
|
||||
setDeployService(service);
|
||||
|
||||
setWidgetExpandedByDefault(false);
|
||||
|
||||
|
||||
@@ -139,7 +139,8 @@ void RsyncDeployService::setFinished()
|
||||
RsyncDeployStep::RsyncDeployStep(BuildStepList *bsl, Id id)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<RsyncDeployService>();
|
||||
auto service = new RsyncDeployService;
|
||||
setDeployService(service);
|
||||
|
||||
auto flags = addAspect<StringAspect>();
|
||||
flags->setDisplayStyle(StringAspect::LineEditDisplay);
|
||||
|
||||
@@ -192,7 +192,8 @@ public:
|
||||
TarPackageDeployStep(BuildStepList *bsl, Id id)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<TarPackageDeployService>();
|
||||
auto service = new TarPackageDeployService;
|
||||
setDeployService(service);
|
||||
|
||||
setWidgetExpandedByDefault(false);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user