ProjectExplorer: Remove DeployConfiguration::initialize

... and adapt remaining users.

The function is now not needed anymore, all setup from the factory.

Change-Id: Ibe77c3e55265309064bc8b840fd1129368cc70c1
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-01-18 13:37:16 +01:00
parent bb5fdc70fa
commit 8f7211b1c6
5 changed files with 11 additions and 36 deletions

View File

@@ -57,10 +57,6 @@ DeployConfiguration::DeployConfiguration(Target *target, Core::Id id)
setDefaultDisplayName(tr("Deploy locally"));
}
void DeployConfiguration::initialize()
{
}
BuildStepList *DeployConfiguration::stepList()
{
return &m_stepList;
@@ -197,7 +193,6 @@ DeployConfiguration *DeployConfigurationFactory::create(Target *parent, Core::Id
DeployConfiguration *dc = m_creator(parent);
if (!dc)
return nullptr;
dc->initialize();
for (const DeployStepCreationInfo &info : qAsConst(m_initialSteps)) {
if (!info.condition || info.condition(parent))
dc->stepList()->appendStep(info.deployStepId);

View File

@@ -47,7 +47,6 @@ protected:
public:
~DeployConfiguration() override = default;
virtual void initialize();
BuildStepList *stepList();
const BuildStepList *stepList() const;

View File

@@ -45,13 +45,6 @@ QnxDeployConfiguration::QnxDeployConfiguration(Target *target, Core::Id id)
{
}
void QnxDeployConfiguration::initialize()
{
stepList()->appendStep(new DeviceCheckBuildStep(stepList()));
stepList()->appendStep(new RemoteLinuxCheckForFreeDiskSpaceStep(stepList()));
stepList()->appendStep(new GenericDirectUploadStep(stepList()));
}
NamedWidget *QnxDeployConfiguration::createConfigWidget()
{
return new DeploymentDataView(target());
@@ -59,10 +52,14 @@ NamedWidget *QnxDeployConfiguration::createConfigWidget()
QnxDeployConfigurationFactory::QnxDeployConfigurationFactory()
{
registerDeployConfiguration<QnxDeployConfiguration>
registerDeployConfiguration<DeployConfiguration>
(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID);
setDefaultDisplayName(QnxDeployConfiguration::tr("Deploy to QNX Device"));
addSupportedTargetDeviceType(QnxDeviceFactory::deviceType());
addInitialStep(DeviceCheckBuildStep::stepId());
addInitialStep(RemoteLinuxCheckForFreeDiskSpaceStep::stepId());
addInitialStep(GenericDirectUploadStep::stepId());
}
} // namespace Internal

View File

@@ -36,7 +36,6 @@ class QnxDeployConfiguration : public ProjectExplorer::DeployConfiguration
public:
QnxDeployConfiguration(ProjectExplorer::Target *target, Core::Id id);
void initialize() override;
ProjectExplorer::NamedWidget *createConfigWidget() override;
};

View File

@@ -39,46 +39,31 @@ using namespace ProjectExplorer;
namespace WinRt {
namespace Internal {
struct WinRtAppDeployConfiguration : DeployConfiguration
{
WinRtAppDeployConfiguration(Target *target, Core::Id id) : DeployConfiguration(target, id) {}
void initialize() { stepList()->appendStep(new WinRtPackageDeploymentStep(stepList())); }
};
WinRtAppDeployConfigurationFactory::WinRtAppDeployConfigurationFactory()
{
registerDeployConfiguration<WinRtAppDeployConfiguration>("WinRTAppxDeployConfiguration");
registerDeployConfiguration<DeployConfiguration>("WinRTAppxDeployConfiguration");
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
"Run windeployqt"));
addSupportedTargetDeviceType(Constants::WINRT_DEVICE_TYPE_LOCAL);
addInitialStep(Constants::WINRT_BUILD_STEP_DEPLOY);
}
struct WinRtPhoneDeployConfiguration : DeployConfiguration
{
WinRtPhoneDeployConfiguration(Target *target, Core::Id id) : DeployConfiguration(target, id) {}
void initialize() { stepList()->appendStep(new WinRtPackageDeploymentStep(stepList())); }
};
WinRtPhoneDeployConfigurationFactory::WinRtPhoneDeployConfigurationFactory()
{
registerDeployConfiguration<WinRtPhoneDeployConfiguration>("WinRTPhoneDeployConfiguration");
registerDeployConfiguration<DeployConfiguration>("WinRTPhoneDeployConfiguration");
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
"Deploy to Windows Phone"));
addSupportedTargetDeviceType(Constants::WINRT_DEVICE_TYPE_PHONE);
addInitialStep(Constants::WINRT_BUILD_STEP_DEPLOY);
}
struct WinRtEmulatorDeployConfiguration : DeployConfiguration
{
WinRtEmulatorDeployConfiguration(Target *target, Core::Id id) : DeployConfiguration(target, id) {}
void initialize() { stepList()->appendStep(new WinRtPackageDeploymentStep(stepList())); }
};
WinRtEmulatorDeployConfigurationFactory::WinRtEmulatorDeployConfigurationFactory()
{
registerDeployConfiguration<WinRtEmulatorDeployConfiguration>("WinRTEmulatorDeployConfiguration");
registerDeployConfiguration<DeployConfiguration>("WinRTEmulatorDeployConfiguration");
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
"Deploy to Windows Phone Emulator"));
addSupportedTargetDeviceType(Constants::WINRT_DEVICE_TYPE_EMULATOR);
addInitialStep(Constants::WINRT_BUILD_STEP_DEPLOY);
}
WinRtDeployStepFactory::WinRtDeployStepFactory()