forked from qt-creator/qt-creator
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:
@@ -57,10 +57,6 @@ DeployConfiguration::DeployConfiguration(Target *target, Core::Id id)
|
|||||||
setDefaultDisplayName(tr("Deploy locally"));
|
setDefaultDisplayName(tr("Deploy locally"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void DeployConfiguration::initialize()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
BuildStepList *DeployConfiguration::stepList()
|
BuildStepList *DeployConfiguration::stepList()
|
||||||
{
|
{
|
||||||
return &m_stepList;
|
return &m_stepList;
|
||||||
@@ -197,7 +193,6 @@ DeployConfiguration *DeployConfigurationFactory::create(Target *parent, Core::Id
|
|||||||
DeployConfiguration *dc = m_creator(parent);
|
DeployConfiguration *dc = m_creator(parent);
|
||||||
if (!dc)
|
if (!dc)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
dc->initialize();
|
|
||||||
for (const DeployStepCreationInfo &info : qAsConst(m_initialSteps)) {
|
for (const DeployStepCreationInfo &info : qAsConst(m_initialSteps)) {
|
||||||
if (!info.condition || info.condition(parent))
|
if (!info.condition || info.condition(parent))
|
||||||
dc->stepList()->appendStep(info.deployStepId);
|
dc->stepList()->appendStep(info.deployStepId);
|
||||||
|
@@ -47,7 +47,6 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
~DeployConfiguration() override = default;
|
~DeployConfiguration() override = default;
|
||||||
virtual void initialize();
|
|
||||||
|
|
||||||
BuildStepList *stepList();
|
BuildStepList *stepList();
|
||||||
const BuildStepList *stepList() const;
|
const BuildStepList *stepList() const;
|
||||||
|
@@ -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()
|
NamedWidget *QnxDeployConfiguration::createConfigWidget()
|
||||||
{
|
{
|
||||||
return new DeploymentDataView(target());
|
return new DeploymentDataView(target());
|
||||||
@@ -59,10 +52,14 @@ NamedWidget *QnxDeployConfiguration::createConfigWidget()
|
|||||||
|
|
||||||
QnxDeployConfigurationFactory::QnxDeployConfigurationFactory()
|
QnxDeployConfigurationFactory::QnxDeployConfigurationFactory()
|
||||||
{
|
{
|
||||||
registerDeployConfiguration<QnxDeployConfiguration>
|
registerDeployConfiguration<DeployConfiguration>
|
||||||
(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID);
|
(Constants::QNX_QNX_DEPLOYCONFIGURATION_ID);
|
||||||
setDefaultDisplayName(QnxDeployConfiguration::tr("Deploy to QNX Device"));
|
setDefaultDisplayName(QnxDeployConfiguration::tr("Deploy to QNX Device"));
|
||||||
addSupportedTargetDeviceType(QnxDeviceFactory::deviceType());
|
addSupportedTargetDeviceType(QnxDeviceFactory::deviceType());
|
||||||
|
|
||||||
|
addInitialStep(DeviceCheckBuildStep::stepId());
|
||||||
|
addInitialStep(RemoteLinuxCheckForFreeDiskSpaceStep::stepId());
|
||||||
|
addInitialStep(GenericDirectUploadStep::stepId());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -36,7 +36,6 @@ class QnxDeployConfiguration : public ProjectExplorer::DeployConfiguration
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
QnxDeployConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
QnxDeployConfiguration(ProjectExplorer::Target *target, Core::Id id);
|
||||||
void initialize() override;
|
|
||||||
ProjectExplorer::NamedWidget *createConfigWidget() override;
|
ProjectExplorer::NamedWidget *createConfigWidget() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -39,46 +39,31 @@ using namespace ProjectExplorer;
|
|||||||
namespace WinRt {
|
namespace WinRt {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
struct WinRtAppDeployConfiguration : DeployConfiguration
|
|
||||||
{
|
|
||||||
WinRtAppDeployConfiguration(Target *target, Core::Id id) : DeployConfiguration(target, id) {}
|
|
||||||
void initialize() { stepList()->appendStep(new WinRtPackageDeploymentStep(stepList())); }
|
|
||||||
};
|
|
||||||
|
|
||||||
WinRtAppDeployConfigurationFactory::WinRtAppDeployConfigurationFactory()
|
WinRtAppDeployConfigurationFactory::WinRtAppDeployConfigurationFactory()
|
||||||
{
|
{
|
||||||
registerDeployConfiguration<WinRtAppDeployConfiguration>("WinRTAppxDeployConfiguration");
|
registerDeployConfiguration<DeployConfiguration>("WinRTAppxDeployConfiguration");
|
||||||
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
|
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
|
||||||
"Run windeployqt"));
|
"Run windeployqt"));
|
||||||
addSupportedTargetDeviceType(Constants::WINRT_DEVICE_TYPE_LOCAL);
|
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()
|
WinRtPhoneDeployConfigurationFactory::WinRtPhoneDeployConfigurationFactory()
|
||||||
{
|
{
|
||||||
registerDeployConfiguration<WinRtPhoneDeployConfiguration>("WinRTPhoneDeployConfiguration");
|
registerDeployConfiguration<DeployConfiguration>("WinRTPhoneDeployConfiguration");
|
||||||
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
|
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
|
||||||
"Deploy to Windows Phone"));
|
"Deploy to Windows Phone"));
|
||||||
addSupportedTargetDeviceType(Constants::WINRT_DEVICE_TYPE_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()
|
WinRtEmulatorDeployConfigurationFactory::WinRtEmulatorDeployConfigurationFactory()
|
||||||
{
|
{
|
||||||
registerDeployConfiguration<WinRtEmulatorDeployConfiguration>("WinRTEmulatorDeployConfiguration");
|
registerDeployConfiguration<DeployConfiguration>("WinRTEmulatorDeployConfiguration");
|
||||||
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
|
setDefaultDisplayName(QCoreApplication::translate("WinRt::Internal::WinRtDeployConfiguration",
|
||||||
"Deploy to Windows Phone Emulator"));
|
"Deploy to Windows Phone Emulator"));
|
||||||
addSupportedTargetDeviceType(Constants::WINRT_DEVICE_TYPE_EMULATOR);
|
addSupportedTargetDeviceType(Constants::WINRT_DEVICE_TYPE_EMULATOR);
|
||||||
|
addInitialStep(Constants::WINRT_BUILD_STEP_DEPLOY);
|
||||||
}
|
}
|
||||||
|
|
||||||
WinRtDeployStepFactory::WinRtDeployStepFactory()
|
WinRtDeployStepFactory::WinRtDeployStepFactory()
|
||||||
|
Reference in New Issue
Block a user