From cda2e97ce53a8c98fe38a03b0c356c42315f0e84 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 27 May 2022 12:31:46 +0200 Subject: [PATCH] Rename UploadAndInstallTarPackageStep into TarPackageDeployStep Make class name shorter and consistent with others. Change-Id: I7102c981848b2a2854421d5b8b947dea81a1799a Reviewed-by: Christian Kandeler Reviewed-by: Reviewed-by: Qt CI Bot --- src/plugins/remotelinux/CMakeLists.txt | 2 +- src/plugins/remotelinux/remotelinux.qbs | 4 +- .../remotelinux/remotelinux_constants.h | 2 +- src/plugins/remotelinux/remotelinuxplugin.cpp | 4 +- ...ckagestep.cpp => tarpackagedeploystep.cpp} | 42 +++++++++---------- ...arpackagestep.h => tarpackagedeploystep.h} | 4 +- 6 files changed, 29 insertions(+), 29 deletions(-) rename src/plugins/remotelinux/{uploadandinstalltarpackagestep.cpp => tarpackagedeploystep.cpp} (79%) rename src/plugins/remotelinux/{uploadandinstalltarpackagestep.h => tarpackagedeploystep.h} (88%) diff --git a/src/plugins/remotelinux/CMakeLists.txt b/src/plugins/remotelinux/CMakeLists.txt index 1572a39d54d..c9d7b2df0f5 100644 --- a/src/plugins/remotelinux/CMakeLists.txt +++ b/src/plugins/remotelinux/CMakeLists.txt @@ -39,7 +39,7 @@ add_qtc_plugin(RemoteLinux sshkeycreationdialog.cpp sshkeycreationdialog.h sshkeycreationdialog.ui sshprocessinterface.h tarpackagecreationstep.cpp tarpackagecreationstep.h - uploadandinstalltarpackagestep.cpp uploadandinstalltarpackagestep.h + tarpackagedeploystep.cpp tarpackagedeploystep.h ) extend_qtc_plugin(RemoteLinux diff --git a/src/plugins/remotelinux/remotelinux.qbs b/src/plugins/remotelinux/remotelinux.qbs index 5bf01c2c49f..f7add4f572b 100644 --- a/src/plugins/remotelinux/remotelinux.qbs +++ b/src/plugins/remotelinux/remotelinux.qbs @@ -83,8 +83,8 @@ Project { "sshprocessinterface.h", "tarpackagecreationstep.cpp", "tarpackagecreationstep.h", - "uploadandinstalltarpackagestep.cpp", - "uploadandinstalltarpackagestep.h", + "tarpackagedeploystep.cpp", + "tarpackagedeploystep.h", "images/embeddedtarget.png", ] diff --git a/src/plugins/remotelinux/remotelinux_constants.h b/src/plugins/remotelinux/remotelinux_constants.h index c3fcdad4a51..843a3d96f36 100644 --- a/src/plugins/remotelinux/remotelinux_constants.h +++ b/src/plugins/remotelinux/remotelinux_constants.h @@ -34,7 +34,7 @@ const char CheckForFreeDiskSpaceId[] = "RemoteLinux.CheckForFreeDiskSpaceStep"; const char DirectUploadStepId[] = "RemoteLinux.DirectUploadStep"; const char MakeInstallStepId[] = "RemoteLinux.MakeInstall"; const char TarPackageCreationStepId[] = "MaemoTarPackageCreationStep"; -const char UploadAndInstallTarPackageStepId[] = "MaemoUploadAndInstallTarPackageStep"; +const char TarPackageDeployStepId[] = "MaemoUploadAndInstallTarPackageStep"; const char RsyncDeployStepId[] = "RemoteLinux.RsyncDeployStep"; const char CustomCommandDeployStepId[] = "RemoteLinux.GenericRemoteLinuxCustomCommandDeploymentStep"; const char KillAppStepId[] = "RemoteLinux.KillAppStep"; diff --git a/src/plugins/remotelinux/remotelinuxplugin.cpp b/src/plugins/remotelinux/remotelinuxplugin.cpp index 86a55970d27..a4239ca2e72 100644 --- a/src/plugins/remotelinux/remotelinuxplugin.cpp +++ b/src/plugins/remotelinux/remotelinuxplugin.cpp @@ -41,7 +41,7 @@ #include "killappstep.h" #include "rsyncdeploystep.h" #include "tarpackagecreationstep.h" -#include "uploadandinstalltarpackagestep.h" +#include "tarpackagedeploystep.h" #ifdef WITH_TESTS #include "filesystemaccess_test.h" @@ -76,7 +76,7 @@ public: RemoteLinuxCustomRunConfigurationFactory customRunConfigurationFactory; RemoteLinuxDeployConfigurationFactory deployConfigurationFactory; GenericDeployStepFactory tarPackageCreationStepFactory; - GenericDeployStepFactory uploadAndInstallTarPackageStepFactory; + GenericDeployStepFactory tarPackageDeployStepFactory; GenericDeployStepFactory genericDirectUploadStepFactory; GenericDeployStepFactory rsyncDeployStepFactory; GenericDeployStepFactory diff --git a/src/plugins/remotelinux/uploadandinstalltarpackagestep.cpp b/src/plugins/remotelinux/tarpackagedeploystep.cpp similarity index 79% rename from src/plugins/remotelinux/uploadandinstalltarpackagestep.cpp rename to src/plugins/remotelinux/tarpackagedeploystep.cpp index c320fc68cd1..d6a58c33c32 100644 --- a/src/plugins/remotelinux/uploadandinstalltarpackagestep.cpp +++ b/src/plugins/remotelinux/tarpackagedeploystep.cpp @@ -23,7 +23,7 @@ ** ****************************************************************************/ -#include "uploadandinstalltarpackagestep.h" +#include "tarpackagedeploystep.h" #include "remotelinux_constants.h" #include "remotelinuxpackageinstaller.h" @@ -43,12 +43,12 @@ using namespace Utils; namespace RemoteLinux { namespace Internal { -class UploadAndInstallTarPackageService : public AbstractRemoteLinuxDeployService +class TarPackageDeployService : public AbstractRemoteLinuxDeployService { Q_OBJECT public: - UploadAndInstallTarPackageService(); + TarPackageDeployService(); void setPackageFilePath(const FilePath &filePath); private: @@ -71,30 +71,30 @@ private: RemoteLinuxTarPackageInstaller m_installer; }; -UploadAndInstallTarPackageService::UploadAndInstallTarPackageService() +TarPackageDeployService::TarPackageDeployService() { connect(&m_uploader, &FileTransfer::done, this, - &UploadAndInstallTarPackageService::handleUploadFinished); + &TarPackageDeployService::handleUploadFinished); connect(&m_uploader, &FileTransfer::progress, this, - &UploadAndInstallTarPackageService::progressMessage); + &TarPackageDeployService::progressMessage); } -void UploadAndInstallTarPackageService::setPackageFilePath(const FilePath &filePath) +void TarPackageDeployService::setPackageFilePath(const FilePath &filePath) { m_packageFilePath = filePath; } -QString UploadAndInstallTarPackageService::uploadDir() const +QString TarPackageDeployService::uploadDir() const { return QLatin1String("/tmp"); } -bool UploadAndInstallTarPackageService::isDeploymentNecessary() const +bool TarPackageDeployService::isDeploymentNecessary() const { return hasLocalFileChanged(DeployableFile(m_packageFilePath, {})); } -void UploadAndInstallTarPackageService::doDeploy() +void TarPackageDeployService::doDeploy() { QTC_ASSERT(m_state == Inactive, return); @@ -107,7 +107,7 @@ void UploadAndInstallTarPackageService::doDeploy() m_uploader.start(); } -void UploadAndInstallTarPackageService::stopDeployment() +void TarPackageDeployService::stopDeployment() { switch (m_state) { case Inactive: @@ -124,7 +124,7 @@ void UploadAndInstallTarPackageService::stopDeployment() } } -void UploadAndInstallTarPackageService::handleUploadFinished(const ProcessResultData &resultData) +void TarPackageDeployService::handleUploadFinished(const ProcessResultData &resultData) { QTC_ASSERT(m_state == Uploading, return); @@ -143,11 +143,11 @@ void UploadAndInstallTarPackageService::handleUploadFinished(const ProcessResult connect(&m_installer, &AbstractRemoteLinuxPackageInstaller::stderrData, this, &AbstractRemoteLinuxDeployService::stdErrData); connect(&m_installer, &AbstractRemoteLinuxPackageInstaller::finished, - this, &UploadAndInstallTarPackageService::handleInstallationFinished); + this, &TarPackageDeployService::handleInstallationFinished); m_installer.installPackage(deviceConfiguration(), remoteFilePath, true); } -void UploadAndInstallTarPackageService::handleInstallationFinished(const QString &errorMsg) +void TarPackageDeployService::handleInstallationFinished(const QString &errorMsg) { QTC_ASSERT(m_state == Installing, return); @@ -160,7 +160,7 @@ void UploadAndInstallTarPackageService::handleInstallationFinished(const QString setFinished(); } -void UploadAndInstallTarPackageService::setFinished() +void TarPackageDeployService::setFinished() { m_state = Inactive; m_uploader.stop(); @@ -172,10 +172,10 @@ void UploadAndInstallTarPackageService::setFinished() using namespace Internal; -UploadAndInstallTarPackageStep::UploadAndInstallTarPackageStep(BuildStepList *bsl, Id id) +TarPackageDeployStep::TarPackageDeployStep(BuildStepList *bsl, Id id) : AbstractRemoteLinuxDeployStep(bsl, id) { - auto service = createDeployService(); + auto service = createDeployService(); setWidgetExpandedByDefault(false); @@ -196,16 +196,16 @@ UploadAndInstallTarPackageStep::UploadAndInstallTarPackageStep(BuildStepList *bs }); } -Id UploadAndInstallTarPackageStep::stepId() +Id TarPackageDeployStep::stepId() { - return Constants::UploadAndInstallTarPackageStepId; + return Constants::TarPackageDeployStepId; } -QString UploadAndInstallTarPackageStep::displayName() +QString TarPackageDeployStep::displayName() { return tr("Deploy tarball via SFTP upload"); } } //namespace RemoteLinux -#include "uploadandinstalltarpackagestep.moc" +#include "tarpackagedeploystep.moc" diff --git a/src/plugins/remotelinux/uploadandinstalltarpackagestep.h b/src/plugins/remotelinux/tarpackagedeploystep.h similarity index 88% rename from src/plugins/remotelinux/uploadandinstalltarpackagestep.h rename to src/plugins/remotelinux/tarpackagedeploystep.h index 5d120dc7271..63eee8b2e5b 100644 --- a/src/plugins/remotelinux/uploadandinstalltarpackagestep.h +++ b/src/plugins/remotelinux/tarpackagedeploystep.h @@ -30,12 +30,12 @@ namespace RemoteLinux { class AbstractRemoteLinuxPackageInstaller; -class REMOTELINUX_EXPORT UploadAndInstallTarPackageStep : public AbstractRemoteLinuxDeployStep +class TarPackageDeployStep : public AbstractRemoteLinuxDeployStep { Q_OBJECT public: - UploadAndInstallTarPackageStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id); + TarPackageDeployStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id); static Utils::Id stepId(); static QString displayName();