forked from qt-creator/qt-creator
Rename RemoteLinuxCheckForFreeDiskSpaceStep
... into CheckForFreeDiskSpaceStep Change-Id: I217c9f6b618f8e88aba64af07736c2966a76c782 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -45,9 +45,9 @@
|
|||||||
|
|
||||||
#include <qtsupport/qtversionfactory.h>
|
#include <qtsupport/qtversionfactory.h>
|
||||||
|
|
||||||
|
#include <remotelinux/checkforfreediskspacestep.h>
|
||||||
#include <remotelinux/genericdirectuploadstep.h>
|
#include <remotelinux/genericdirectuploadstep.h>
|
||||||
#include <remotelinux/makeinstallstep.h>
|
#include <remotelinux/makeinstallstep.h>
|
||||||
#include <remotelinux/remotelinuxcheckforfreediskspacestep.h>
|
|
||||||
#include <remotelinux/remotelinux_constants.h>
|
#include <remotelinux/remotelinux_constants.h>
|
||||||
|
|
||||||
#include <utils/hostosinfo.h>
|
#include <utils/hostosinfo.h>
|
||||||
@@ -176,7 +176,7 @@ public:
|
|||||||
QdbStopApplicationStepFactory m_stopApplicationStepFactory;
|
QdbStopApplicationStepFactory m_stopApplicationStepFactory;
|
||||||
QdbMakeDefaultAppStepFactory m_makeDefaultAppStepFactory;
|
QdbMakeDefaultAppStepFactory m_makeDefaultAppStepFactory;
|
||||||
|
|
||||||
QdbDeployStepFactory<RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceStep>
|
QdbDeployStepFactory<RemoteLinux::CheckForFreeDiskSpaceStep>
|
||||||
m_checkForFreeDiskSpaceStepFactory{RemoteLinux::Constants::CheckForFreeDiskSpaceId};
|
m_checkForFreeDiskSpaceStepFactory{RemoteLinux::Constants::CheckForFreeDiskSpaceId};
|
||||||
QdbDeployStepFactory<RemoteLinux::GenericDirectUploadStep>
|
QdbDeployStepFactory<RemoteLinux::GenericDirectUploadStep>
|
||||||
m_directUploadStepFactory{RemoteLinux::Constants::DirectUploadStepId};
|
m_directUploadStepFactory{RemoteLinux::Constants::DirectUploadStepId};
|
||||||
|
@@ -54,9 +54,9 @@
|
|||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
|
|
||||||
|
#include <remotelinux/checkforfreediskspacestep.h>
|
||||||
#include <remotelinux/genericdirectuploadstep.h>
|
#include <remotelinux/genericdirectuploadstep.h>
|
||||||
#include <remotelinux/makeinstallstep.h>
|
#include <remotelinux/makeinstallstep.h>
|
||||||
#include <remotelinux/remotelinuxcheckforfreediskspacestep.h>
|
|
||||||
#include <remotelinux/remotelinux_constants.h>
|
#include <remotelinux/remotelinux_constants.h>
|
||||||
|
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
@@ -123,7 +123,7 @@ public:
|
|||||||
QnxDeviceFactory deviceFactory;
|
QnxDeviceFactory deviceFactory;
|
||||||
QnxDeployConfigurationFactory deployConfigFactory;
|
QnxDeployConfigurationFactory deployConfigFactory;
|
||||||
GenericQnxDeployStepFactory<QnxUploadStep> directUploadDeployFactory;
|
GenericQnxDeployStepFactory<QnxUploadStep> directUploadDeployFactory;
|
||||||
GenericQnxDeployStepFactory<RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceStep> checkForFreeDiskSpaceDeployFactory;
|
GenericQnxDeployStepFactory<RemoteLinux::CheckForFreeDiskSpaceStep> checkForFreeDiskSpaceDeployFactory;
|
||||||
GenericQnxDeployStepFactory<RemoteLinux::MakeInstallStep> makeInstallDeployFactory;
|
GenericQnxDeployStepFactory<RemoteLinux::MakeInstallStep> makeInstallDeployFactory;
|
||||||
GenericQnxDeployStepFactory<DeviceCheckBuildStep> checkBuildDeployFactory;
|
GenericQnxDeployStepFactory<DeviceCheckBuildStep> checkBuildDeployFactory;
|
||||||
QnxRunConfigurationFactory runConfigFactory;
|
QnxRunConfigurationFactory runConfigFactory;
|
||||||
|
@@ -5,6 +5,7 @@ add_qtc_plugin(RemoteLinux
|
|||||||
abstractpackagingstep.cpp abstractpackagingstep.h
|
abstractpackagingstep.cpp abstractpackagingstep.h
|
||||||
abstractremotelinuxdeployservice.cpp abstractremotelinuxdeployservice.h
|
abstractremotelinuxdeployservice.cpp abstractremotelinuxdeployservice.h
|
||||||
abstractremotelinuxdeploystep.cpp abstractremotelinuxdeploystep.h
|
abstractremotelinuxdeploystep.cpp abstractremotelinuxdeploystep.h
|
||||||
|
checkforfreediskspacestep.cpp checkforfreediskspacestep.h
|
||||||
customcommanddeploystep.cpp customcommanddeploystep.h
|
customcommanddeploystep.cpp customcommanddeploystep.h
|
||||||
deploymenttimeinfo.cpp deploymenttimeinfo.h
|
deploymenttimeinfo.cpp deploymenttimeinfo.h
|
||||||
genericdirectuploadservice.cpp genericdirectuploadservice.h
|
genericdirectuploadservice.cpp genericdirectuploadservice.h
|
||||||
@@ -22,7 +23,6 @@ add_qtc_plugin(RemoteLinux
|
|||||||
remotelinux.qrc
|
remotelinux.qrc
|
||||||
remotelinux_constants.h
|
remotelinux_constants.h
|
||||||
remotelinux_export.h
|
remotelinux_export.h
|
||||||
remotelinuxcheckforfreediskspacestep.cpp remotelinuxcheckforfreediskspacestep.h
|
|
||||||
remotelinuxcustomrunconfiguration.cpp remotelinuxcustomrunconfiguration.h
|
remotelinuxcustomrunconfiguration.cpp remotelinuxcustomrunconfiguration.h
|
||||||
remotelinuxdebugsupport.cpp remotelinuxdebugsupport.h
|
remotelinuxdebugsupport.cpp remotelinuxdebugsupport.h
|
||||||
remotelinuxdeployconfiguration.cpp remotelinuxdeployconfiguration.h
|
remotelinuxdeployconfiguration.cpp remotelinuxdeployconfiguration.h
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
**
|
**
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#include "remotelinuxcheckforfreediskspacestep.h"
|
#include "checkforfreediskspacestep.h"
|
||||||
|
|
||||||
#include "abstractremotelinuxdeployservice.h"
|
#include "abstractremotelinuxdeployservice.h"
|
||||||
|
|
||||||
@@ -41,14 +41,12 @@ using namespace Utils;
|
|||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
|
||||||
// RemoteLinuxCheckForFreeDiskSpaceService
|
class CheckForFreeDiskSpaceService : public AbstractRemoteLinuxDeployService
|
||||||
|
|
||||||
class RemoteLinuxCheckForFreeDiskSpaceService : public AbstractRemoteLinuxDeployService
|
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::RemoteLinuxCheckForFreeDiskSpaceService)
|
Q_DECLARE_TR_FUNCTIONS(RemoteLinux::CheckForFreeDiskSpaceService)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RemoteLinuxCheckForFreeDiskSpaceService() {}
|
CheckForFreeDiskSpaceService() {}
|
||||||
|
|
||||||
void setPathToCheck(const QString &path);
|
void setPathToCheck(const QString &path);
|
||||||
void setRequiredSpaceInBytes(quint64 sizeInBytes);
|
void setRequiredSpaceInBytes(quint64 sizeInBytes);
|
||||||
@@ -65,17 +63,17 @@ private:
|
|||||||
quint64 m_requiredSpaceInBytes = 0;
|
quint64 m_requiredSpaceInBytes = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void RemoteLinuxCheckForFreeDiskSpaceService::setPathToCheck(const QString &path)
|
void CheckForFreeDiskSpaceService::setPathToCheck(const QString &path)
|
||||||
{
|
{
|
||||||
m_pathToCheck = path;
|
m_pathToCheck = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxCheckForFreeDiskSpaceService::setRequiredSpaceInBytes(quint64 sizeInBytes)
|
void CheckForFreeDiskSpaceService::setRequiredSpaceInBytes(quint64 sizeInBytes)
|
||||||
{
|
{
|
||||||
m_requiredSpaceInBytes = sizeInBytes;
|
m_requiredSpaceInBytes = sizeInBytes;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RemoteLinuxCheckForFreeDiskSpaceService::doDeploy()
|
void CheckForFreeDiskSpaceService::doDeploy()
|
||||||
{
|
{
|
||||||
auto cleanup = qScopeGuard([this] { setFinished(); });
|
auto cleanup = qScopeGuard([this] { setFinished(); });
|
||||||
const FilePath path = deviceConfiguration()->filePath(m_pathToCheck);
|
const FilePath path = deviceConfiguration()->filePath(m_pathToCheck);
|
||||||
@@ -104,7 +102,7 @@ void RemoteLinuxCheckForFreeDiskSpaceService::doDeploy()
|
|||||||
handleDeploymentDone();
|
handleDeploymentDone();
|
||||||
}
|
}
|
||||||
|
|
||||||
CheckResult RemoteLinuxCheckForFreeDiskSpaceService::isDeploymentPossible() const
|
CheckResult CheckForFreeDiskSpaceService::isDeploymentPossible() const
|
||||||
{
|
{
|
||||||
if (!m_pathToCheck.startsWith('/')) {
|
if (!m_pathToCheck.startsWith('/')) {
|
||||||
return CheckResult::failure(
|
return CheckResult::failure(
|
||||||
@@ -115,13 +113,11 @@ CheckResult RemoteLinuxCheckForFreeDiskSpaceService::isDeploymentPossible() cons
|
|||||||
return AbstractRemoteLinuxDeployService::isDeploymentPossible();
|
return AbstractRemoteLinuxDeployService::isDeploymentPossible();
|
||||||
}
|
}
|
||||||
|
|
||||||
// RemoteLinuxCheckForFreeDiskSpaceStep
|
CheckForFreeDiskSpaceStep::CheckForFreeDiskSpaceStep
|
||||||
|
|
||||||
RemoteLinuxCheckForFreeDiskSpaceStep::RemoteLinuxCheckForFreeDiskSpaceStep
|
|
||||||
(BuildStepList *bsl, Id id)
|
(BuildStepList *bsl, Id id)
|
||||||
: AbstractRemoteLinuxDeployStep(bsl, id)
|
: AbstractRemoteLinuxDeployStep(bsl, id)
|
||||||
{
|
{
|
||||||
auto service = createDeployService<RemoteLinuxCheckForFreeDiskSpaceService>();
|
auto service = createDeployService<CheckForFreeDiskSpaceService>();
|
||||||
|
|
||||||
auto pathToCheckAspect = addAspect<StringAspect>();
|
auto pathToCheckAspect = addAspect<StringAspect>();
|
||||||
pathToCheckAspect->setSettingsKey("RemoteLinux.CheckForFreeDiskSpaceStep.PathToCheck");
|
pathToCheckAspect->setSettingsKey("RemoteLinux.CheckForFreeDiskSpaceStep.PathToCheck");
|
||||||
@@ -144,14 +140,12 @@ RemoteLinuxCheckForFreeDiskSpaceStep::RemoteLinuxCheckForFreeDiskSpaceStep
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
RemoteLinuxCheckForFreeDiskSpaceStep::~RemoteLinuxCheckForFreeDiskSpaceStep() = default;
|
Id CheckForFreeDiskSpaceStep::stepId()
|
||||||
|
|
||||||
Id RemoteLinuxCheckForFreeDiskSpaceStep::stepId()
|
|
||||||
{
|
{
|
||||||
return "RemoteLinux.CheckForFreeDiskSpaceStep";
|
return "RemoteLinux.CheckForFreeDiskSpaceStep";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RemoteLinuxCheckForFreeDiskSpaceStep::displayName()
|
QString CheckForFreeDiskSpaceStep::displayName()
|
||||||
{
|
{
|
||||||
return tr("Check for free disk space");
|
return tr("Check for free disk space");
|
||||||
}
|
}
|
@@ -29,13 +29,12 @@
|
|||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT RemoteLinuxCheckForFreeDiskSpaceStep : public AbstractRemoteLinuxDeployStep
|
class REMOTELINUX_EXPORT CheckForFreeDiskSpaceStep : public AbstractRemoteLinuxDeployStep
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RemoteLinuxCheckForFreeDiskSpaceStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
CheckForFreeDiskSpaceStep(ProjectExplorer::BuildStepList *bsl, Utils::Id id);
|
||||||
~RemoteLinuxCheckForFreeDiskSpaceStep() override;
|
|
||||||
|
|
||||||
static Utils::Id stepId();
|
static Utils::Id stepId();
|
||||||
static QString displayName();
|
static QString displayName();
|
@@ -21,6 +21,8 @@ Project {
|
|||||||
"abstractremotelinuxdeploystep.h",
|
"abstractremotelinuxdeploystep.h",
|
||||||
"deploymenttimeinfo.cpp",
|
"deploymenttimeinfo.cpp",
|
||||||
"deploymenttimeinfo.h",
|
"deploymenttimeinfo.h",
|
||||||
|
"checkforfreediskspacestep.cpp",
|
||||||
|
"checkforfreediskspacestep.h",
|
||||||
"customcommanddeploystep.cpp",
|
"customcommanddeploystep.cpp",
|
||||||
"customcommanddeploystep.h",
|
"customcommanddeploystep.h",
|
||||||
"genericdirectuploadservice.cpp",
|
"genericdirectuploadservice.cpp",
|
||||||
@@ -49,8 +51,6 @@ Project {
|
|||||||
"remotelinux.qrc",
|
"remotelinux.qrc",
|
||||||
"remotelinux_constants.h",
|
"remotelinux_constants.h",
|
||||||
"remotelinux_export.h",
|
"remotelinux_export.h",
|
||||||
"remotelinuxcheckforfreediskspacestep.cpp",
|
|
||||||
"remotelinuxcheckforfreediskspacestep.h",
|
|
||||||
"remotelinuxcustomrunconfiguration.cpp",
|
"remotelinuxcustomrunconfiguration.cpp",
|
||||||
"remotelinuxcustomrunconfiguration.h",
|
"remotelinuxcustomrunconfiguration.h",
|
||||||
"remotelinuxdebugsupport.cpp",
|
"remotelinuxdebugsupport.cpp",
|
||||||
|
@@ -25,9 +25,9 @@
|
|||||||
|
|
||||||
#include "remotelinuxdeployconfiguration.h"
|
#include "remotelinuxdeployconfiguration.h"
|
||||||
|
|
||||||
|
#include "checkforfreediskspacestep.h"
|
||||||
#include "genericdirectuploadstep.h"
|
#include "genericdirectuploadstep.h"
|
||||||
#include "makeinstallstep.h"
|
#include "makeinstallstep.h"
|
||||||
#include "remotelinuxcheckforfreediskspacestep.h"
|
|
||||||
#include "killappstep.h"
|
#include "killappstep.h"
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
#include "rsyncdeploystep.h"
|
#include "rsyncdeploystep.h"
|
||||||
@@ -76,7 +76,7 @@ RemoteLinuxDeployConfigurationFactory::RemoteLinuxDeployConfigurationFactory()
|
|||||||
});
|
});
|
||||||
|
|
||||||
addInitialStep(MakeInstallStep::stepId(), needsMakeInstall);
|
addInitialStep(MakeInstallStep::stepId(), needsMakeInstall);
|
||||||
addInitialStep(RemoteLinuxCheckForFreeDiskSpaceStep::stepId());
|
addInitialStep(CheckForFreeDiskSpaceStep::stepId());
|
||||||
addInitialStep(KillAppStep::stepId());
|
addInitialStep(KillAppStep::stepId());
|
||||||
addInitialStep(RsyncDeployStep::stepId(), [](Target *target) {
|
addInitialStep(RsyncDeployStep::stepId(), [](Target *target) {
|
||||||
auto device = DeviceKitAspect::device(target->kit());
|
auto device = DeviceKitAspect::device(target->kit());
|
||||||
|
@@ -25,13 +25,13 @@
|
|||||||
|
|
||||||
#include "remotelinuxplugin.h"
|
#include "remotelinuxplugin.h"
|
||||||
|
|
||||||
|
#include "checkforfreediskspacestep.h"
|
||||||
#include "customcommanddeploystep.h"
|
#include "customcommanddeploystep.h"
|
||||||
#include "genericdirectuploadstep.h"
|
#include "genericdirectuploadstep.h"
|
||||||
#include "killappstep.h"
|
#include "killappstep.h"
|
||||||
#include "linuxdevice.h"
|
#include "linuxdevice.h"
|
||||||
#include "makeinstallstep.h"
|
#include "makeinstallstep.h"
|
||||||
#include "remotelinux_constants.h"
|
#include "remotelinux_constants.h"
|
||||||
#include "remotelinuxcheckforfreediskspacestep.h"
|
|
||||||
#include "remotelinuxdeployconfiguration.h"
|
#include "remotelinuxdeployconfiguration.h"
|
||||||
#include "remotelinuxqmltoolingsupport.h"
|
#include "remotelinuxqmltoolingsupport.h"
|
||||||
#include "remotelinuxcustomrunconfiguration.h"
|
#include "remotelinuxcustomrunconfiguration.h"
|
||||||
@@ -79,8 +79,7 @@ public:
|
|||||||
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
GenericDeployStepFactory<GenericDirectUploadStep> genericDirectUploadStepFactory;
|
||||||
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
GenericDeployStepFactory<RsyncDeployStep> rsyncDeployStepFactory;
|
||||||
GenericDeployStepFactory<CustomCommandDeployStep> customCommandDeployStepFactory;
|
GenericDeployStepFactory<CustomCommandDeployStep> customCommandDeployStepFactory;
|
||||||
GenericDeployStepFactory<RemoteLinuxCheckForFreeDiskSpaceStep>
|
GenericDeployStepFactory<CheckForFreeDiskSpaceStep> checkForFreeDiskSpaceStepFactory;
|
||||||
checkForFreeDiskSpaceStepFactory;
|
|
||||||
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
GenericDeployStepFactory<KillAppStep> killAppStepFactory;
|
||||||
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
GenericDeployStepFactory<MakeInstallStep> makeInstallStepFactory;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user