forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user