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 <qtsupport/qtversionfactory.h>
|
||||||
|
|
||||||
#include <remotelinux/genericdirectuploadstep.h>
|
|
||||||
#include <remotelinux/makeinstallstep.h>
|
|
||||||
#include <remotelinux/rsyncdeploystep.h>
|
|
||||||
#include <remotelinux/remotelinux_constants.h>
|
#include <remotelinux/remotelinux_constants.h>
|
||||||
|
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
@@ -41,8 +38,7 @@
|
|||||||
using namespace ProjectExplorer;
|
using namespace ProjectExplorer;
|
||||||
using namespace Utils;
|
using namespace Utils;
|
||||||
|
|
||||||
namespace Qdb {
|
namespace Qdb::Internal {
|
||||||
namespace Internal {
|
|
||||||
|
|
||||||
static FilePath flashWizardFilePath()
|
static FilePath flashWizardFilePath()
|
||||||
{
|
{
|
||||||
@@ -100,14 +96,14 @@ void registerFlashAction(QObject *parentForAction)
|
|||||||
toolsContainer->addAction(flashCommand, flashActionId);
|
toolsContainer->addAction(flashCommand, flashActionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Factory>
|
class QdbDeployStepFactory : public BuildStepFactory
|
||||||
class QdbDeployStepFactory : public Factory
|
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QdbDeployStepFactory()
|
explicit QdbDeployStepFactory(Id existingStepId)
|
||||||
{
|
{
|
||||||
Factory::setSupportedConfiguration(Constants::QdbDeployConfigurationId);
|
cloneStep(existingStepId);
|
||||||
Factory::setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
|
setSupportedConfiguration(Constants::QdbDeployConfigurationId);
|
||||||
|
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -123,9 +119,9 @@ public:
|
|||||||
QdbStopApplicationStepFactory m_stopApplicationStepFactory;
|
QdbStopApplicationStepFactory m_stopApplicationStepFactory;
|
||||||
QdbMakeDefaultAppStepFactory m_makeDefaultAppStepFactory;
|
QdbMakeDefaultAppStepFactory m_makeDefaultAppStepFactory;
|
||||||
|
|
||||||
QdbDeployStepFactory<RemoteLinux::GenericDirectUploadStepFactory> m_directUploadStepFactory;
|
QdbDeployStepFactory m_directUploadStepFactory{RemoteLinux::Constants::DirectUploadStepId};
|
||||||
QdbDeployStepFactory<RemoteLinux::RsyncDeployStepFactory> m_rsyncDeployStepFactory;
|
QdbDeployStepFactory m_rsyncDeployStepFactory{RemoteLinux::Constants::RsyncDeployStepId};
|
||||||
QdbDeployStepFactory<RemoteLinux::MakeInstallStepFactory> m_makeInstallStepFactory;
|
QdbDeployStepFactory m_makeInstallStepFactory{RemoteLinux::Constants::MakeInstallStepId};
|
||||||
|
|
||||||
const QList<Id> supportedRunConfigs {
|
const QList<Id> supportedRunConfigs {
|
||||||
m_runConfigFactory.runConfigurationId(),
|
m_runConfigFactory.runConfigurationId(),
|
||||||
@@ -175,5 +171,4 @@ void QdbPluginPrivate::setupDeviceDetection()
|
|||||||
m_deviceDetector.start();
|
m_deviceDetector.start();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Internal
|
} // Qdb::Internal
|
||||||
} // Qdb
|
|
||||||
|
|||||||
Reference in New Issue
Block a user