forked from qt-creator/qt-creator
RemoteLinux: Don't make presence of device an absolute prerequisite ...
... for deployment and running. Rationale: An emulator might get started on-demand during deployment and get auto-detected in the process. Change-Id: Id95ccccbf4d570f9fa69a6ed3a8a473fd63c5968 Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
@@ -155,7 +155,7 @@ bool MaemoUploadAndInstallPackageStep::isDeploymentPossible(QString *whyNot) con
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||||
return AbstractRemoteLinuxDeployStep::isDeploymentPossible(whyNot);
|
return deployService()->isDeploymentPossible(whyNot);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MaemoUploadAndInstallPackageStep::stepId()
|
QString MaemoUploadAndInstallPackageStep::stepId()
|
||||||
@@ -202,7 +202,7 @@ bool MeegoUploadAndInstallPackageStep::isDeploymentPossible(QString *whyNot) con
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||||
return AbstractRemoteLinuxDeployStep::isDeploymentPossible(whyNot);
|
return deployService()->isDeploymentPossible(whyNot);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MeegoUploadAndInstallPackageStep::stepId()
|
QString MeegoUploadAndInstallPackageStep::stepId()
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ bool MaemoInstallPackageViaMountStep::isDeploymentPossible(QString *whyNot) cons
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||||
return AbstractRemoteLinuxDeployStep::isDeploymentPossible(whyNot);
|
return deployService()->isDeploymentPossible(whyNot);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MaemoInstallPackageViaMountStep::stepId()
|
QString MaemoInstallPackageViaMountStep::stepId()
|
||||||
@@ -476,7 +476,7 @@ bool MaemoCopyFilesViaMountStep::isDeploymentPossible(QString *whyNot) const
|
|||||||
for (int i = 0; i < deployableCount; ++i)
|
for (int i = 0; i < deployableCount; ++i)
|
||||||
deployableFiles << deploymentInfo->deployableAt(i);
|
deployableFiles << deploymentInfo->deployableAt(i);
|
||||||
m_deployService->setDeployableFiles(deployableFiles);
|
m_deployService->setDeployableFiles(deployableFiles);
|
||||||
return AbstractRemoteLinuxDeployStep::isDeploymentPossible(whyNot);
|
return deployService()->isDeploymentPossible(whyNot);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MaemoCopyFilesViaMountStep::stepId()
|
QString MaemoCopyFilesViaMountStep::stepId()
|
||||||
|
|||||||
@@ -80,19 +80,14 @@ QVariantMap AbstractRemoteLinuxDeployStep::toMap() const
|
|||||||
bool AbstractRemoteLinuxDeployStep::init()
|
bool AbstractRemoteLinuxDeployStep::init()
|
||||||
{
|
{
|
||||||
QString error;
|
QString error;
|
||||||
|
deployService()->setDeviceConfiguration(deployConfiguration()->deviceConfiguration());
|
||||||
|
deployService()->setBuildConfiguration(qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration *>(target()->activeBuildConfiguration()));
|
||||||
const bool canDeploy = isDeploymentPossible(&error);
|
const bool canDeploy = isDeploymentPossible(&error);
|
||||||
if (!canDeploy)
|
if (!canDeploy)
|
||||||
emit addOutput(tr("Deployment failed: %1").arg(error), ErrorMessageOutput);
|
emit addOutput(tr("Deployment failed: %1").arg(error), ErrorMessageOutput);
|
||||||
return canDeploy;
|
return canDeploy;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AbstractRemoteLinuxDeployStep::isDeploymentPossible(QString *whyNot) const
|
|
||||||
{
|
|
||||||
deployService()->setDeviceConfiguration(deployConfiguration()->deviceConfiguration());
|
|
||||||
deployService()->setBuildConfiguration(qobject_cast<Qt4ProjectManager::Qt4BuildConfiguration *>(target()->activeBuildConfiguration()));
|
|
||||||
return deployService()->isDeploymentPossible(whyNot);
|
|
||||||
}
|
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployStep::run(QFutureInterface<bool> &fi)
|
void AbstractRemoteLinuxDeployStep::run(QFutureInterface<bool> &fi)
|
||||||
{
|
{
|
||||||
connect(deployService(), SIGNAL(errorMessage(QString)), SLOT(handleErrorMessage(QString)));
|
connect(deployService(), SIGNAL(errorMessage(QString)), SLOT(handleErrorMessage(QString)));
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ protected:
|
|||||||
AbstractRemoteLinuxDeployStep(ProjectExplorer::BuildStepList *bsl,
|
AbstractRemoteLinuxDeployStep(ProjectExplorer::BuildStepList *bsl,
|
||||||
AbstractRemoteLinuxDeployStep *other);
|
AbstractRemoteLinuxDeployStep *other);
|
||||||
|
|
||||||
virtual bool isDeploymentPossible(QString *whyNot = 0) const;
|
virtual bool isDeploymentPossible(QString *whyNot = 0) const = 0;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleProgressMessage(const QString &message);
|
void handleProgressMessage(const QString &message);
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ bool GenericDirectUploadStep::isDeploymentPossible(QString *whyNot) const
|
|||||||
deployableFiles << deploymentInfo->deployableAt(i);
|
deployableFiles << deploymentInfo->deployableAt(i);
|
||||||
deployService()->setDeployableFiles(deployableFiles);
|
deployService()->setDeployableFiles(deployableFiles);
|
||||||
deployService()->setIncrementalDeployment(incrementalDeployment());
|
deployService()->setIncrementalDeployment(incrementalDeployment());
|
||||||
return AbstractRemoteLinuxDeployStep::isDeploymentPossible(whyNot);
|
return deployService()->isDeploymentPossible(whyNot);
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericDirectUploadService *GenericDirectUploadStep::deployService() const
|
GenericDirectUploadService *GenericDirectUploadStep::deployService() const
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ QString AbstractRemoteLinuxCustomCommandDeploymentStep::commandLine() const
|
|||||||
bool AbstractRemoteLinuxCustomCommandDeploymentStep::isDeploymentPossible(QString *whyNot) const
|
bool AbstractRemoteLinuxCustomCommandDeploymentStep::isDeploymentPossible(QString *whyNot) const
|
||||||
{
|
{
|
||||||
deployService()->setCommandLine(d->commandLine);
|
deployService()->setCommandLine(d->commandLine);
|
||||||
return AbstractRemoteLinuxDeployStep::isDeploymentPossible(whyNot);
|
return deployService()->isDeploymentPossible(whyNot);
|
||||||
}
|
}
|
||||||
|
|
||||||
BuildStepConfigWidget *AbstractRemoteLinuxCustomCommandDeploymentStep::createConfigWidget()
|
BuildStepConfigWidget *AbstractRemoteLinuxCustomCommandDeploymentStep::createConfigWidget()
|
||||||
|
|||||||
@@ -49,9 +49,10 @@ public:
|
|||||||
|
|
||||||
void setCommandLine(const QString &commandLine);
|
void setCommandLine(const QString &commandLine);
|
||||||
|
|
||||||
protected:
|
|
||||||
bool isDeploymentNecessary() const { return true; }
|
bool isDeploymentNecessary() const { return true; }
|
||||||
bool isDeploymentPossible(QString *whyNot = 0) const;
|
bool isDeploymentPossible(QString *whyNot = 0) const;
|
||||||
|
|
||||||
|
protected:
|
||||||
void doDeviceSetup() { handleDeviceSetupDone(true); }
|
void doDeviceSetup() { handleDeviceSetupDone(true); }
|
||||||
void stopDeviceSetup() { handleDeviceSetupDone(false); }
|
void stopDeviceSetup() { handleDeviceSetupDone(false); }
|
||||||
void doDeploy();
|
void doDeploy();
|
||||||
|
|||||||
@@ -162,10 +162,6 @@ bool RemoteLinuxRunConfiguration::isEnabled() const
|
|||||||
d->disabledReason = tr("The .pro file could not be parsed.");
|
d->disabledReason = tr("The .pro file could not be parsed.");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (!deviceConfig()) {
|
|
||||||
d->disabledReason = tr("No device configuration set.");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!activeQt4BuildConfiguration()) {
|
if (!activeQt4BuildConfiguration()) {
|
||||||
d->disabledReason = tr("No active build configuration.");
|
d->disabledReason = tr("No active build configuration.");
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ bool UploadAndInstallTarPackageStep::isDeploymentPossible(QString *whyNot) const
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
m_deployService->setPackageFilePath(pStep->packageFilePath());
|
||||||
return AbstractRemoteLinuxDeployStep::isDeploymentPossible(whyNot);
|
return m_deployService->isDeploymentPossible(whyNot);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString UploadAndInstallTarPackageStep::stepId()
|
QString UploadAndInstallTarPackageStep::stepId()
|
||||||
|
|||||||
Reference in New Issue
Block a user