forked from qt-creator/qt-creator
RemoteLinux: Slimmer interface of tarpackagedeploystep handling
Change-Id: Iae162718226182dd5d5af87c2aae260a9f8c7b45 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -75,7 +75,7 @@ public:
|
||||
RemoteLinuxCustomRunConfigurationFactory customRunConfigurationFactory;
|
||||
RemoteLinuxDeployConfigurationFactory deployConfigurationFactory;
|
||||
GenericDeployStepFactory<TarPackageCreationStep> tarPackageCreationStepFactory;
|
||||
GenericDeployStepFactory<TarPackageDeployStep> tarPackageDeployStepFactory;
|
||||
TarPackageDeployStepFactory tarPackageDeployStepFactory;
|
||||
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
||||
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
||||
GenericDeployStepFactory<CustomCommandDeployStep> customCommandDeployStepFactory;
|
||||
|
@@ -26,18 +26,18 @@
|
||||
#include "tarpackagedeploystep.h"
|
||||
|
||||
#include "abstractremotelinuxdeployservice.h"
|
||||
#include "abstractremotelinuxdeploystep.h"
|
||||
#include "remotelinux_constants.h"
|
||||
#include "tarpackagecreationstep.h"
|
||||
|
||||
#include <projectexplorer/deployconfiguration.h>
|
||||
#include <projectexplorer/devicesupport/filetransfer.h>
|
||||
#include <projectexplorer/devicesupport/idevice.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
#include <utils/processinterface.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
@@ -49,10 +49,11 @@ class TarPackageInstaller : public QObject
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TarPackageInstaller(QObject *parent = nullptr);
|
||||
TarPackageInstaller();
|
||||
|
||||
void installPackage(const ProjectExplorer::IDeviceConstPtr &deviceConfig,
|
||||
const QString &packageFilePath, bool removePackageFile);
|
||||
void installPackage(const IDeviceConstPtr &deviceConfig,
|
||||
const QString &packageFilePath,
|
||||
bool removePackageFile);
|
||||
void cancelInstallation();
|
||||
|
||||
signals:
|
||||
@@ -66,8 +67,7 @@ private:
|
||||
QtcProcess m_killer;
|
||||
};
|
||||
|
||||
TarPackageInstaller::TarPackageInstaller(QObject *parent)
|
||||
: QObject(parent)
|
||||
TarPackageInstaller::TarPackageInstaller()
|
||||
{
|
||||
connect(&m_installer, &QtcProcess::readyReadStandardOutput, this, [this] {
|
||||
emit stdoutData(QString::fromUtf8(m_installer.readAllStandardOutput()));
|
||||
@@ -230,13 +230,16 @@ void TarPackageDeployService::setFinished()
|
||||
handleDeploymentDone();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
// TarPackageDeployStep
|
||||
|
||||
using namespace Internal;
|
||||
|
||||
TarPackageDeployStep::TarPackageDeployStep(BuildStepList *bsl, Id id)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
class TarPackageDeployStep : public AbstractRemoteLinuxDeployStep
|
||||
{
|
||||
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::Internal::TarPackageDeployStep)
|
||||
|
||||
public:
|
||||
TarPackageDeployStep(BuildStepList *bsl, Id id)
|
||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||
{
|
||||
auto service = createDeployService<TarPackageDeployService>();
|
||||
|
||||
setWidgetExpandedByDefault(false);
|
||||
@@ -256,18 +259,21 @@ TarPackageDeployStep::TarPackageDeployStep(BuildStepList *bsl, Id id)
|
||||
service->setPackageFilePath(pStep->packageFilePath());
|
||||
return service->isDeploymentPossible();
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Id TarPackageDeployStep::stepId()
|
||||
|
||||
// TarPackageDeployStepFactory
|
||||
|
||||
TarPackageDeployStepFactory::TarPackageDeployStepFactory()
|
||||
{
|
||||
return Constants::TarPackageDeployStepId;
|
||||
registerStep<TarPackageDeployStep>(Constants::TarPackageDeployStepId);
|
||||
setDisplayName(TarPackageDeployStep::tr("Deploy tarball via SFTP upload"));
|
||||
setSupportedConfiguration(RemoteLinux::Constants::DeployToGenericLinux);
|
||||
setSupportedStepList(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
|
||||
}
|
||||
|
||||
QString TarPackageDeployStep::displayName()
|
||||
{
|
||||
return tr("Deploy tarball via SFTP upload");
|
||||
}
|
||||
|
||||
} //namespace RemoteLinux
|
||||
} // Internal
|
||||
} // RemoteLinux
|
||||
|
||||
#include "tarpackagedeploystep.moc"
|
||||
|
@@ -25,19 +25,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "abstractremotelinuxdeploystep.h"
|
||||
#include <projectexplorer/buildstep.h>
|
||||
|
||||
namespace RemoteLinux {
|
||||
namespace Internal {
|
||||
|
||||
class TarPackageDeployStep : public AbstractRemoteLinuxDeployStep
|
||||
class TarPackageDeployStepFactory : public ProjectExplorer::BuildStepFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TarPackageDeployStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
||||
|
||||
static Utils::Id stepId();
|
||||
static QString displayName();
|
||||
TarPackageDeployStepFactory();
|
||||
};
|
||||
|
||||
} //namespace RemoteLinux
|
||||
} // Internal
|
||||
} // RemoteLinux
|
||||
|
Reference in New Issue
Block a user