diff options
author | hjk <hjk@qt.io> | 2023-04-05 09:45:10 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2023-04-05 12:15:48 +0000 |
commit | 25c33be9f4d420d2026ce02cb23c7e8b75df151a (patch) | |
tree | c2fd8b8833d5233355ed507ff3d110caca7dd55e /src/plugins/boot2qt | |
parent | 7265fd479c121330fbbb26888a5a0a7136ae050b (diff) |
Boot2Qt: Switch deploy step creation to clone-by-id
This finally cuts the compile-time dependency on individual
factories or even step implementations.
Change-Id: I764d489231762982dad803ce1cad9aca6352f1d9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src/plugins/boot2qt')
-rw-r--r-- | src/plugins/boot2qt/qdbplugin.cpp | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/src/plugins/boot2qt/qdbplugin.cpp b/src/plugins/boot2qt/qdbplugin.cpp index 0d995ee040..41fc79e2a2 100644 --- a/src/plugins/boot2qt/qdbplugin.cpp +++ b/src/plugins/boot2qt/qdbplugin.cpp @@ -27,9 +27,6 @@ #include <qtsupport/qtversionfactory.h> -#include <remotelinux/genericdirectuploadstep.h> -#include <remotelinux/makeinstallstep.h> -#include <remotelinux/rsyncdeploystep.h> #include <remotelinux/remotelinux_constants.h> #include <utils/hostosinfo.h> @@ -41,8 +38,7 @@ using namespace ProjectExplorer; using namespace Utils; -namespace Qdb { -namespace Internal { +namespace Qdb::Internal { static FilePath flashWizardFilePath() { @@ -100,14 +96,14 @@ void registerFlashAction(QObject *parentForAction) toolsContainer->addAction(flashCommand, flashActionId); } -template <class Factory> -class QdbDeployStepFactory : public Factory +class QdbDeployStepFactory : public BuildStepFactory { public: - QdbDeployStepFactory() + explicit QdbDeployStepFactory(Id existingStepId) { - Factory::setSupportedConfiguration(Constants::QdbDeployConfigurationId); - Factory::setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY); + cloneStep(existingStepId); + setSupportedConfiguration(Constants::QdbDeployConfigurationId); + setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY); } }; @@ -123,9 +119,9 @@ public: QdbStopApplicationStepFactory m_stopApplicationStepFactory; QdbMakeDefaultAppStepFactory m_makeDefaultAppStepFactory; - QdbDeployStepFactory<RemoteLinux::GenericDirectUploadStepFactory> m_directUploadStepFactory; - QdbDeployStepFactory<RemoteLinux::RsyncDeployStepFactory> m_rsyncDeployStepFactory; - QdbDeployStepFactory<RemoteLinux::MakeInstallStepFactory> m_makeInstallStepFactory; + QdbDeployStepFactory m_directUploadStepFactory{RemoteLinux::Constants::DirectUploadStepId}; + QdbDeployStepFactory m_rsyncDeployStepFactory{RemoteLinux::Constants::RsyncDeployStepId}; + QdbDeployStepFactory m_makeInstallStepFactory{RemoteLinux::Constants::MakeInstallStepId}; const QList<Id> supportedRunConfigs { m_runConfigFactory.runConfigurationId(), @@ -175,5 +171,4 @@ void QdbPluginPrivate::setupDeviceDetection() m_deviceDetector.start(); } -} // Internal -} // Qdb +} // Qdb::Internal |