Rename UploadAndInstallTarPackageStep into TarPackageDeployStep

Make class name shorter and consistent with others.

Change-Id: I7102c981848b2a2854421d5b8b947dea81a1799a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Jarek Kobus
2022-05-27 12:31:46 +02:00
parent f921578a67
commit cda2e97ce5
6 changed files with 29 additions and 29 deletions

View File

@@ -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

View File

@@ -83,8 +83,8 @@ Project {
"sshprocessinterface.h",
"tarpackagecreationstep.cpp",
"tarpackagecreationstep.h",
"uploadandinstalltarpackagestep.cpp",
"uploadandinstalltarpackagestep.h",
"tarpackagedeploystep.cpp",
"tarpackagedeploystep.h",
"images/embeddedtarget.png",
]

View File

@@ -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";

View File

@@ -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<TarPackageCreationStep> tarPackageCreationStepFactory;
GenericDeployStepFactory<UploadAndInstallTarPackageStep> uploadAndInstallTarPackageStepFactory;
GenericDeployStepFactory<TarPackageDeployStep> tarPackageDeployStepFactory;
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
GenericDeployStepFactory<RemoteLinuxCustomCommandDeploymentStep>

View File

@@ -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<UploadAndInstallTarPackageService>();
auto service = createDeployService<TarPackageDeployService>();
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"

View File

@@ -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();