forked from qt-creator/qt-creator
RemoteLinux: Further disantangle buildsteps from downstream
Expose Factories, (mid term:) hide step implementations. Change-Id: I930899fe6873c8f727f3dedbb86aceb9bcbda0a4 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -100,16 +100,14 @@ void registerFlashAction(QObject *parentForAction)
|
||||
toolsContainer->addAction(flashCommand, flashActionId);
|
||||
}
|
||||
|
||||
template <class Step>
|
||||
class QdbDeployStepFactory : public ProjectExplorer::BuildStepFactory
|
||||
template <class Factory>
|
||||
class QdbDeployStepFactory : public Factory
|
||||
{
|
||||
public:
|
||||
explicit QdbDeployStepFactory(Id id)
|
||||
QdbDeployStepFactory()
|
||||
{
|
||||
registerStep<Step>(id);
|
||||
setDisplayName(Step::displayName());
|
||||
setSupportedConfiguration(Constants::QdbDeployConfigurationId);
|
||||
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
|
||||
Factory::setSupportedConfiguration(Constants::QdbDeployConfigurationId);
|
||||
Factory::setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -125,12 +123,9 @@ public:
|
||||
QdbStopApplicationStepFactory m_stopApplicationStepFactory;
|
||||
QdbMakeDefaultAppStepFactory m_makeDefaultAppStepFactory;
|
||||
|
||||
QdbDeployStepFactory<RemoteLinux::GenericDirectUploadStep>
|
||||
m_directUploadStepFactory{RemoteLinux::Constants::DirectUploadStepId};
|
||||
QdbDeployStepFactory<RemoteLinux::RsyncDeployStep>
|
||||
m_rsyncDeployStepFactory{RemoteLinux::Constants::RsyncDeployStepId};
|
||||
QdbDeployStepFactory<RemoteLinux::MakeInstallStep>
|
||||
m_makeInstallStepFactory{RemoteLinux::Constants::MakeInstallStepId};
|
||||
QdbDeployStepFactory<RemoteLinux::GenericDirectUploadStepFactory> m_directUploadStepFactory;
|
||||
QdbDeployStepFactory<RemoteLinux::RsyncDeployStepFactory> m_rsyncDeployStepFactory;
|
||||
QdbDeployStepFactory<RemoteLinux::MakeInstallStepFactory> m_makeInstallStepFactory;
|
||||
|
||||
const QList<Id> supportedRunConfigs {
|
||||
m_runConfigFactory.runConfigurationId(),
|
||||
|
||||
@@ -332,4 +332,12 @@ QString GenericDirectUploadStep::displayName()
|
||||
return Tr::tr("Upload files via SFTP");
|
||||
}
|
||||
|
||||
// Factory
|
||||
|
||||
GenericDirectUploadStepFactory::GenericDirectUploadStepFactory()
|
||||
{
|
||||
registerStep<GenericDirectUploadStep>(Constants::DirectUploadStepId);
|
||||
setDisplayName(Tr::tr("Upload files via SFTP"));
|
||||
}
|
||||
|
||||
} //namespace RemoteLinux
|
||||
|
||||
@@ -28,4 +28,11 @@ private:
|
||||
class GenericDirectUploadStepPrivate *d;
|
||||
};
|
||||
|
||||
class REMOTELINUX_EXPORT GenericDirectUploadStepFactory
|
||||
: public ProjectExplorer::BuildStepFactory
|
||||
{
|
||||
public:
|
||||
GenericDirectUploadStepFactory();
|
||||
};
|
||||
|
||||
} // RemoteLinux
|
||||
|
||||
@@ -281,4 +281,12 @@ bool MakeInstallStep::fromMap(const QVariantMap &map)
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace RemoteLinux
|
||||
// Factory
|
||||
|
||||
MakeInstallStepFactory::MakeInstallStepFactory()
|
||||
{
|
||||
registerStep<MakeInstallStep>(Constants::MakeInstallStepId);
|
||||
setDisplayName(Tr::tr("Install into temporary host directory"));
|
||||
}
|
||||
|
||||
} // RemoteLinux
|
||||
|
||||
@@ -41,4 +41,11 @@ private:
|
||||
bool m_isCmakeProject = false;
|
||||
};
|
||||
|
||||
class REMOTELINUX_EXPORT MakeInstallStepFactory
|
||||
: public ProjectExplorer::BuildStepFactory
|
||||
{
|
||||
public:
|
||||
MakeInstallStepFactory();
|
||||
};
|
||||
|
||||
} // namespace RemoteLinux
|
||||
|
||||
@@ -137,4 +137,12 @@ QString RsyncDeployStep::displayName()
|
||||
return Tr::tr("Deploy files via rsync");
|
||||
}
|
||||
|
||||
// Factory
|
||||
|
||||
RsyncDeployStepFactory::RsyncDeployStepFactory()
|
||||
{
|
||||
registerStep<RsyncDeployStep>(Constants::RsyncDeployStepId);
|
||||
setDisplayName(Tr::tr("Deploy files via rsync"));
|
||||
}
|
||||
|
||||
} // RemoteLinux
|
||||
|
||||
@@ -33,4 +33,11 @@ private:
|
||||
QString m_flags;
|
||||
};
|
||||
|
||||
class REMOTELINUX_EXPORT RsyncDeployStepFactory
|
||||
: public ProjectExplorer::BuildStepFactory
|
||||
{
|
||||
public:
|
||||
RsyncDeployStepFactory();
|
||||
};
|
||||
|
||||
} // namespace RemoteLinux
|
||||
|
||||
Reference in New Issue
Block a user