forked from qt-creator/qt-creator
RemoteLinux: Rename and unconstify deploy step function.
The name "isDeploymentPossible" was misleading, as was the const modifier. Change-Id: Iccaa307133f56ab02a8d6054b0ca9bf660e0d30d Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -145,17 +145,17 @@ AbstractRemoteLinuxDeployService *MaemoUploadAndInstallPackageStep::deployServic
|
||||
return m_deployService;
|
||||
}
|
||||
|
||||
bool MaemoUploadAndInstallPackageStep::isDeploymentPossible(QString *whyNot) const
|
||||
bool MaemoUploadAndInstallPackageStep::initInternal(QString *error)
|
||||
{
|
||||
const AbstractMaemoPackageCreationStep * const pStep
|
||||
= deployConfiguration()->earlierBuildStep<MaemoDebianPackageCreationStep>(this);
|
||||
if (!pStep) {
|
||||
if (whyNot)
|
||||
*whyNot = tr("No Debian package creation step found.");
|
||||
if (error)
|
||||
*error = tr("No Debian package creation step found.");
|
||||
return false;
|
||||
}
|
||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||
return deployService()->isDeploymentPossible(whyNot);
|
||||
return deployService()->isDeploymentPossible(error);
|
||||
}
|
||||
|
||||
QString MaemoUploadAndInstallPackageStep::stepId()
|
||||
@@ -192,17 +192,17 @@ AbstractRemoteLinuxDeployService *MeegoUploadAndInstallPackageStep::deployServic
|
||||
return m_deployService;
|
||||
}
|
||||
|
||||
bool MeegoUploadAndInstallPackageStep::isDeploymentPossible(QString *whyNot) const
|
||||
bool MeegoUploadAndInstallPackageStep::initInternal(QString *error)
|
||||
{
|
||||
const AbstractMaemoPackageCreationStep * const pStep
|
||||
= deployConfiguration()->earlierBuildStep<MaemoRpmPackageCreationStep>(this);
|
||||
if (!pStep) {
|
||||
if (whyNot)
|
||||
*whyNot = tr("No RPM package creation step found.");
|
||||
if (error)
|
||||
*error = tr("No RPM package creation step found.");
|
||||
return false;
|
||||
}
|
||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||
return deployService()->isDeploymentPossible(whyNot);
|
||||
return deployService()->isDeploymentPossible(error);
|
||||
}
|
||||
|
||||
QString MeegoUploadAndInstallPackageStep::stepId()
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
MaemoUploadAndInstallPackageStep(ProjectExplorer::BuildStepList *bsl,
|
||||
MaemoUploadAndInstallPackageStep *other);
|
||||
|
||||
bool isDeploymentPossible(QString *whyNot = 0) const;
|
||||
bool initInternal(QString *error = 0);
|
||||
|
||||
static QString stepId();
|
||||
static QString displayName();
|
||||
@@ -71,7 +71,7 @@ public:
|
||||
MeegoUploadAndInstallPackageStep(ProjectExplorer::BuildStepList *bsl,
|
||||
MeegoUploadAndInstallPackageStep *other);
|
||||
|
||||
bool isDeploymentPossible(QString *whyNot) const;
|
||||
bool initInternal(QString *error);
|
||||
|
||||
static QString stepId();
|
||||
static QString displayName();
|
||||
|
||||
@@ -420,17 +420,17 @@ AbstractRemoteLinuxDeployService *MaemoInstallPackageViaMountStep::deployService
|
||||
return m_deployService;
|
||||
}
|
||||
|
||||
bool MaemoInstallPackageViaMountStep::isDeploymentPossible(QString *whyNot) const
|
||||
bool MaemoInstallPackageViaMountStep::initInternal(QString *error)
|
||||
{
|
||||
const AbstractMaemoPackageCreationStep * const pStep
|
||||
= deployConfiguration()->earlierBuildStep<MaemoDebianPackageCreationStep>(this);
|
||||
if (!pStep) {
|
||||
if (whyNot)
|
||||
*whyNot = tr("No Debian package creation step found.");
|
||||
if (error)
|
||||
*error = tr("No Debian package creation step found.");
|
||||
return false;
|
||||
}
|
||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||
return deployService()->isDeploymentPossible(whyNot);
|
||||
return deployService()->isDeploymentPossible(error);
|
||||
}
|
||||
|
||||
QString MaemoInstallPackageViaMountStep::stepId()
|
||||
@@ -468,7 +468,7 @@ AbstractRemoteLinuxDeployService *MaemoCopyFilesViaMountStep::deployService() co
|
||||
return m_deployService;
|
||||
}
|
||||
|
||||
bool MaemoCopyFilesViaMountStep::isDeploymentPossible(QString *whyNot) const
|
||||
bool MaemoCopyFilesViaMountStep::initInternal(QString *error)
|
||||
{
|
||||
QList<DeployableFile> deployableFiles;
|
||||
const QSharedPointer<DeploymentInfo> deploymentInfo = deployConfiguration()->deploymentInfo();
|
||||
@@ -476,7 +476,7 @@ bool MaemoCopyFilesViaMountStep::isDeploymentPossible(QString *whyNot) const
|
||||
for (int i = 0; i < deployableCount; ++i)
|
||||
deployableFiles << deploymentInfo->deployableAt(i);
|
||||
m_deployService->setDeployableFiles(deployableFiles);
|
||||
return deployService()->isDeploymentPossible(whyNot);
|
||||
return deployService()->isDeploymentPossible(error);
|
||||
}
|
||||
|
||||
QString MaemoCopyFilesViaMountStep::stepId()
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
MaemoInstallPackageViaMountStep(ProjectExplorer::BuildStepList *bsl,
|
||||
MaemoInstallPackageViaMountStep *other);
|
||||
|
||||
bool isDeploymentPossible(QString *whyNot = 0) const;
|
||||
bool initInternal(QString *error = 0);
|
||||
|
||||
static QString stepId();
|
||||
static QString displayName();
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
MaemoCopyFilesViaMountStep(ProjectExplorer::BuildStepList *bsl,
|
||||
MaemoCopyFilesViaMountStep *other);
|
||||
|
||||
bool isDeploymentPossible(QString *whyNot = 0) const;
|
||||
bool initInternal(QString *error = 0);
|
||||
|
||||
static QString stepId();
|
||||
static QString displayName();
|
||||
|
||||
@@ -82,7 +82,7 @@ bool AbstractRemoteLinuxDeployStep::init()
|
||||
QString error;
|
||||
deployService()->setDeviceConfiguration(deployConfiguration()->deviceConfiguration());
|
||||
deployService()->setBuildConfiguration(qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration *>(target()->activeBuildConfiguration()));
|
||||
const bool canDeploy = isDeploymentPossible(&error);
|
||||
const bool canDeploy = initInternal(&error);
|
||||
if (!canDeploy)
|
||||
emit addOutput(tr("Deployment failed: %1").arg(error), ErrorMessageOutput);
|
||||
return canDeploy;
|
||||
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
AbstractRemoteLinuxDeployStep(ProjectExplorer::BuildStepList *bsl,
|
||||
AbstractRemoteLinuxDeployStep *other);
|
||||
|
||||
virtual bool isDeploymentPossible(QString *whyNot = 0) const = 0;
|
||||
virtual bool initInternal(QString *error = 0) = 0;
|
||||
|
||||
private slots:
|
||||
void handleProgressMessage(const QString &message);
|
||||
|
||||
@@ -117,7 +117,7 @@ BuildStepConfigWidget *GenericDirectUploadStep::createConfigWidget()
|
||||
return new Internal::ConfigWidget(this);
|
||||
}
|
||||
|
||||
bool GenericDirectUploadStep::isDeploymentPossible(QString *whyNot) const
|
||||
bool GenericDirectUploadStep::initInternal(QString *error)
|
||||
{
|
||||
QList<DeployableFile> deployableFiles;
|
||||
const QSharedPointer<DeploymentInfo> deploymentInfo = deployConfiguration()->deploymentInfo();
|
||||
@@ -126,7 +126,7 @@ bool GenericDirectUploadStep::isDeploymentPossible(QString *whyNot) const
|
||||
deployableFiles << deploymentInfo->deployableAt(i);
|
||||
deployService()->setDeployableFiles(deployableFiles);
|
||||
deployService()->setIncrementalDeployment(incrementalDeployment());
|
||||
return deployService()->isDeploymentPossible(whyNot);
|
||||
return deployService()->isDeploymentPossible(error);
|
||||
}
|
||||
|
||||
GenericDirectUploadService *GenericDirectUploadStep::deployService() const
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
~GenericDirectUploadStep();
|
||||
|
||||
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
|
||||
bool isDeploymentPossible(QString *whyNot = 0) const;
|
||||
bool initInternal(QString *error = 0);
|
||||
|
||||
void setIncrementalDeployment(bool incremental);
|
||||
bool incrementalDeployment() const;
|
||||
|
||||
@@ -151,10 +151,10 @@ QString AbstractRemoteLinuxCustomCommandDeploymentStep::commandLine() const
|
||||
return d->commandLine;
|
||||
}
|
||||
|
||||
bool AbstractRemoteLinuxCustomCommandDeploymentStep::isDeploymentPossible(QString *whyNot) const
|
||||
bool AbstractRemoteLinuxCustomCommandDeploymentStep::initInternal(QString *error)
|
||||
{
|
||||
deployService()->setCommandLine(d->commandLine);
|
||||
return deployService()->isDeploymentPossible(whyNot);
|
||||
return deployService()->isDeploymentPossible(error);
|
||||
}
|
||||
|
||||
BuildStepConfigWidget *AbstractRemoteLinuxCustomCommandDeploymentStep::createConfigWidget()
|
||||
|
||||
@@ -61,7 +61,7 @@ protected:
|
||||
AbstractRemoteLinuxCustomCommandDeploymentStep(ProjectExplorer::BuildStepList *bsl,
|
||||
AbstractRemoteLinuxCustomCommandDeploymentStep *other);
|
||||
|
||||
bool isDeploymentPossible(QString *whyNot = 0) const;
|
||||
bool initInternal(QString *error = 0);
|
||||
|
||||
private:
|
||||
void ctor();
|
||||
|
||||
@@ -86,17 +86,17 @@ void UploadAndInstallTarPackageStep::ctor()
|
||||
setDefaultDisplayName(displayName());
|
||||
}
|
||||
|
||||
bool UploadAndInstallTarPackageStep::isDeploymentPossible(QString *whyNot) const
|
||||
bool UploadAndInstallTarPackageStep::initInternal(QString *error)
|
||||
{
|
||||
const TarPackageCreationStep * const pStep
|
||||
= deployConfiguration()->earlierBuildStep<TarPackageCreationStep>(this);
|
||||
if (!pStep) {
|
||||
if (whyNot)
|
||||
*whyNot = tr("No tarball creation step found.");
|
||||
if (error)
|
||||
*error = tr("No tarball creation step found.");
|
||||
return false;
|
||||
}
|
||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||
return m_deployService->isDeploymentPossible(whyNot);
|
||||
return m_deployService->isDeploymentPossible(error);
|
||||
}
|
||||
|
||||
QString UploadAndInstallTarPackageStep::stepId()
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
UploadAndInstallTarPackageStep(ProjectExplorer::BuildStepList *bsl,
|
||||
UploadAndInstallTarPackageStep *other);
|
||||
|
||||
bool isDeploymentPossible(QString *whyNot = 0) const;
|
||||
bool initInternal(QString *error = 0);
|
||||
|
||||
static QString stepId();
|
||||
static QString displayName();
|
||||
|
||||
Reference in New Issue
Block a user