forked from qt-creator/qt-creator
Rename RemoteLinuxCustomCommandDeploymentStep
... into CustomCommandDeployStep Change-Id: I67e4d74f6df76ad301cb45926ecc550d9275d779 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -5,6 +5,7 @@ add_qtc_plugin(RemoteLinux
|
||||
abstractpackagingstep.cpp abstractpackagingstep.h
|
||||
abstractremotelinuxdeployservice.cpp abstractremotelinuxdeployservice.h
|
||||
abstractremotelinuxdeploystep.cpp abstractremotelinuxdeploystep.h
|
||||
customcommanddeploystep.cpp customcommanddeploystep.h
|
||||
deploymenttimeinfo.cpp deploymenttimeinfo.h
|
||||
genericdirectuploadservice.cpp genericdirectuploadservice.h
|
||||
genericdirectuploadstep.cpp genericdirectuploadstep.h
|
||||
@@ -22,7 +23,6 @@ add_qtc_plugin(RemoteLinux
|
||||
remotelinux_constants.h
|
||||
remotelinux_export.h
|
||||
remotelinuxcheckforfreediskspacestep.cpp remotelinuxcheckforfreediskspacestep.h
|
||||
remotelinuxcustomcommanddeploymentstep.cpp remotelinuxcustomcommanddeploymentstep.h
|
||||
remotelinuxcustomrunconfiguration.cpp remotelinuxcustomrunconfiguration.h
|
||||
remotelinuxdebugsupport.cpp remotelinuxdebugsupport.h
|
||||
remotelinuxdeployconfiguration.cpp remotelinuxdeployconfiguration.h
|
||||
|
@@ -23,7 +23,7 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include "remotelinuxcustomcommanddeploymentstep.h"
|
||||
#include "customcommanddeploystep.h"
|
||||
|
||||
#include "remotelinux_constants.h"
|
||||
|
||||
@@ -38,14 +38,12 @@ using namespace Utils;
|
||||
namespace RemoteLinux {
|
||||
namespace Internal {
|
||||
|
||||
// RemoteLinuxCustomCommandDeployService
|
||||
|
||||
class RemoteLinuxCustomCommandDeployService : public AbstractRemoteLinuxDeployService
|
||||
class CustomCommandDeployService : public AbstractRemoteLinuxDeployService
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::RemoteLinuxCustomCommandDeployService)
|
||||
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::CustomCommandDeployService)
|
||||
|
||||
public:
|
||||
RemoteLinuxCustomCommandDeployService();
|
||||
CustomCommandDeployService();
|
||||
|
||||
void setCommandLine(const QString &commandLine);
|
||||
|
||||
@@ -60,7 +58,7 @@ protected:
|
||||
QtcProcess m_process;
|
||||
};
|
||||
|
||||
RemoteLinuxCustomCommandDeployService::RemoteLinuxCustomCommandDeployService()
|
||||
CustomCommandDeployService::CustomCommandDeployService()
|
||||
{
|
||||
connect(&m_process, &QtcProcess::readyReadStandardOutput, this, [this] {
|
||||
emit stdOutData(QString::fromUtf8(m_process.readAllStandardOutput()));
|
||||
@@ -82,12 +80,12 @@ RemoteLinuxCustomCommandDeployService::RemoteLinuxCustomCommandDeployService()
|
||||
});
|
||||
}
|
||||
|
||||
void RemoteLinuxCustomCommandDeployService::setCommandLine(const QString &commandLine)
|
||||
void CustomCommandDeployService::setCommandLine(const QString &commandLine)
|
||||
{
|
||||
m_commandLine = commandLine;
|
||||
}
|
||||
|
||||
CheckResult RemoteLinuxCustomCommandDeployService::isDeploymentPossible() const
|
||||
CheckResult CustomCommandDeployService::isDeploymentPossible() const
|
||||
{
|
||||
if (m_commandLine.isEmpty())
|
||||
return CheckResult::failure(tr("No command line given."));
|
||||
@@ -95,7 +93,7 @@ CheckResult RemoteLinuxCustomCommandDeployService::isDeploymentPossible() const
|
||||
return AbstractRemoteLinuxDeployService::isDeploymentPossible();
|
||||
}
|
||||
|
||||
void RemoteLinuxCustomCommandDeployService::doDeploy()
|
||||
void CustomCommandDeployService::doDeploy()
|
||||
{
|
||||
emit progressMessage(tr("Starting remote command \"%1\"...").arg(m_commandLine));
|
||||
m_process.setCommand({deviceConfiguration()->filePath("/bin/sh"),
|
||||
@@ -103,7 +101,7 @@ void RemoteLinuxCustomCommandDeployService::doDeploy()
|
||||
m_process.start();
|
||||
}
|
||||
|
||||
void RemoteLinuxCustomCommandDeployService::stopDeployment()
|
||||
void CustomCommandDeployService::stopDeployment()
|
||||
{
|
||||
m_process.close();
|
||||
handleDeploymentDone();
|
||||
@@ -111,14 +109,10 @@ void RemoteLinuxCustomCommandDeployService::stopDeployment()
|
||||
|
||||
} // Internal
|
||||
|
||||
|
||||
// RemoteLinuxCustomCommandDeploymentStep
|
||||
|
||||
RemoteLinuxCustomCommandDeploymentStep::RemoteLinuxCustomCommandDeploymentStep
|
||||
(BuildStepList *bsl, Utils::Id id)
|
||||
CustomCommandDeployStep::CustomCommandDeployStep(BuildStepList *bsl, Utils::Id id)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<Internal::RemoteLinuxCustomCommandDeployService>();
|
||||
auto service = createDeployService<Internal::CustomCommandDeployService>();
|
||||
|
||||
auto commandLine = addAspect<StringAspect>();
|
||||
commandLine->setSettingsKey("RemoteLinuxCustomCommandDeploymentStep.CommandLine");
|
||||
@@ -134,14 +128,12 @@ RemoteLinuxCustomCommandDeploymentStep::RemoteLinuxCustomCommandDeploymentStep
|
||||
addMacroExpander();
|
||||
}
|
||||
|
||||
RemoteLinuxCustomCommandDeploymentStep::~RemoteLinuxCustomCommandDeploymentStep() = default;
|
||||
|
||||
Utils::Id RemoteLinuxCustomCommandDeploymentStep::stepId()
|
||||
Utils::Id CustomCommandDeployStep::stepId()
|
||||
{
|
||||
return Constants::CustomCommandDeployStepId;
|
||||
}
|
||||
|
||||
QString RemoteLinuxCustomCommandDeploymentStep::displayName()
|
||||
QString CustomCommandDeployStep::displayName()
|
||||
{
|
||||
return tr("Run custom remote command");
|
||||
}
|
@@ -29,14 +29,12 @@
|
||||
|
||||
namespace RemoteLinux {
|
||||
|
||||
class REMOTELINUX_EXPORT RemoteLinuxCustomCommandDeploymentStep
|
||||
: public AbstractRemoteLinuxDeployStep
|
||||
class REMOTELINUX_EXPORT CustomCommandDeployStep : public AbstractRemoteLinuxDeployStep
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
RemoteLinuxCustomCommandDeploymentStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
||||
~RemoteLinuxCustomCommandDeploymentStep() override;
|
||||
CustomCommandDeployStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
||||
|
||||
static Utils::Id stepId();
|
||||
static QString displayName();
|
@@ -21,6 +21,8 @@ Project {
|
||||
"abstractremotelinuxdeploystep.h",
|
||||
"deploymenttimeinfo.cpp",
|
||||
"deploymenttimeinfo.h",
|
||||
"customcommanddeploystep.cpp",
|
||||
"customcommanddeploystep.h",
|
||||
"genericdirectuploadservice.cpp",
|
||||
"genericdirectuploadservice.h",
|
||||
"genericdirectuploadstep.cpp",
|
||||
@@ -49,8 +51,6 @@ Project {
|
||||
"remotelinux_export.h",
|
||||
"remotelinuxcheckforfreediskspacestep.cpp",
|
||||
"remotelinuxcheckforfreediskspacestep.h",
|
||||
"remotelinuxcustomcommanddeploymentstep.cpp",
|
||||
"remotelinuxcustomcommanddeploymentstep.h",
|
||||
"remotelinuxcustomrunconfiguration.cpp",
|
||||
"remotelinuxcustomrunconfiguration.h",
|
||||
"remotelinuxdebugsupport.cpp",
|
||||
|
@@ -25,20 +25,19 @@
|
||||
|
||||
#include "remotelinuxplugin.h"
|
||||
|
||||
#include "customcommanddeploystep.h"
|
||||
#include "genericdirectuploadstep.h"
|
||||
#include "killappstep.h"
|
||||
#include "linuxdevice.h"
|
||||
#include "makeinstallstep.h"
|
||||
#include "remotelinux_constants.h"
|
||||
#include "remotelinuxcheckforfreediskspacestep.h"
|
||||
#include "remotelinuxdeployconfiguration.h"
|
||||
#include "remotelinuxqmltoolingsupport.h"
|
||||
#include "remotelinuxcustomrunconfiguration.h"
|
||||
#include "remotelinuxdebugsupport.h"
|
||||
#include "remotelinuxdeployconfiguration.h"
|
||||
#include "remotelinuxrunconfiguration.h"
|
||||
|
||||
#include "genericdirectuploadstep.h"
|
||||
#include "makeinstallstep.h"
|
||||
#include "remotelinuxcheckforfreediskspacestep.h"
|
||||
#include "remotelinuxdeployconfiguration.h"
|
||||
#include "remotelinuxcustomcommanddeploymentstep.h"
|
||||
#include "killappstep.h"
|
||||
#include "rsyncdeploystep.h"
|
||||
#include "tarpackagecreationstep.h"
|
||||
#include "tarpackagedeploystep.h"
|
||||
@@ -79,8 +78,7 @@ public:
|
||||
GenericDeployStepFactory<TarPackageDeployStep> tarPackageDeployStepFactory;
|
||||
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
||||
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
||||
GenericDeployStepFactory<RemoteLinuxCustomCommandDeploymentStep>
|
||||
customCommandDeploymentStepFactory;
|
||||
GenericDeployStepFactory<CustomCommandDeployStep> customCommandDeployStepFactory;
|
||||
GenericDeployStepFactory<RemoteLinuxCheckForFreeDiskSpaceStep>
|
||||
checkForFreeDiskSpaceStepFactory;
|
||||
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
||||
|
Reference in New Issue
Block a user