forked from qt-creator/qt-creator
RemoteLinuxDeployService: Remove superfluous dependency on bc
Change-Id: I214bf081192c4071d4082623792f7a12a9de61c8 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
This commit is contained in:
@@ -168,8 +168,8 @@ void AbstractMaemoDeployByMountService::doDeploy()
|
|||||||
{
|
{
|
||||||
QTC_ASSERT(m_state == Inactive, return);
|
QTC_ASSERT(m_state == Inactive, return);
|
||||||
|
|
||||||
if (!buildConfiguration()) {
|
if (!target()) {
|
||||||
emit errorMessage(tr("Missing build configuration."));
|
emit errorMessage(tr("Missing target."));
|
||||||
setFinished();
|
setFinished();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -255,7 +255,7 @@ QString AbstractMaemoDeployByMountService::deployMountPoint() const
|
|||||||
{
|
{
|
||||||
return MaemoGlobal::homeDirOnDevice(deviceConfiguration()->sshParameters().userName)
|
return MaemoGlobal::homeDirOnDevice(deviceConfiguration()->sshParameters().userName)
|
||||||
+ QLatin1String("/deployMountPoint_")
|
+ QLatin1String("/deployMountPoint_")
|
||||||
+ buildConfiguration()->target()->project()->displayName();
|
+ target()->project()->displayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -29,7 +29,6 @@
|
|||||||
|
|
||||||
#include "abstractremotelinuxdeployservice.h"
|
#include "abstractremotelinuxdeployservice.h"
|
||||||
|
|
||||||
#include <projectexplorer/buildconfiguration.h>
|
|
||||||
#include <projectexplorer/deployablefile.h>
|
#include <projectexplorer/deployablefile.h>
|
||||||
#include <projectexplorer/target.h>
|
#include <projectexplorer/target.h>
|
||||||
#include <qtsupport/qtkitinformation.h>
|
#include <qtsupport/qtkitinformation.h>
|
||||||
@@ -85,7 +84,7 @@ public:
|
|||||||
: kit(0), connection(0), state(Inactive), stopRequested(false) {}
|
: kit(0), connection(0), state(Inactive), stopRequested(false) {}
|
||||||
|
|
||||||
IDevice::ConstPtr deviceConfiguration;
|
IDevice::ConstPtr deviceConfiguration;
|
||||||
QPointer<BuildConfiguration> buildConfiguration;
|
QPointer<Target> target;
|
||||||
Kit *kit;
|
Kit *kit;
|
||||||
SshConnection *connection;
|
SshConnection *connection;
|
||||||
State state;
|
State state;
|
||||||
@@ -107,9 +106,9 @@ AbstractRemoteLinuxDeployService::~AbstractRemoteLinuxDeployService()
|
|||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
|
||||||
const BuildConfiguration *AbstractRemoteLinuxDeployService::buildConfiguration() const
|
const Target *AbstractRemoteLinuxDeployService::target() const
|
||||||
{
|
{
|
||||||
return d->buildConfiguration;
|
return d->target;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Kit *AbstractRemoteLinuxDeployService::profile() const
|
const Kit *AbstractRemoteLinuxDeployService::profile() const
|
||||||
@@ -129,7 +128,7 @@ SshConnection *AbstractRemoteLinuxDeployService::connection() const
|
|||||||
|
|
||||||
void AbstractRemoteLinuxDeployService::saveDeploymentTimeStamp(const DeployableFile &deployableFile)
|
void AbstractRemoteLinuxDeployService::saveDeploymentTimeStamp(const DeployableFile &deployableFile)
|
||||||
{
|
{
|
||||||
if (!d->buildConfiguration)
|
if (!d->target)
|
||||||
return;
|
return;
|
||||||
const QtSupport::BaseQtVersion *const qtVersion
|
const QtSupport::BaseQtVersion *const qtVersion
|
||||||
= QtSupport::QtKitInformation::qtVersion(d->kit);
|
= QtSupport::QtKitInformation::qtVersion(d->kit);
|
||||||
@@ -146,7 +145,7 @@ void AbstractRemoteLinuxDeployService::saveDeploymentTimeStamp(const DeployableF
|
|||||||
|
|
||||||
bool AbstractRemoteLinuxDeployService::hasChangedSinceLastDeployment(const DeployableFile &deployableFile) const
|
bool AbstractRemoteLinuxDeployService::hasChangedSinceLastDeployment(const DeployableFile &deployableFile) const
|
||||||
{
|
{
|
||||||
if (!d->buildConfiguration)
|
if (!target())
|
||||||
return true;
|
return true;
|
||||||
const QtSupport::BaseQtVersion *const qtVersion
|
const QtSupport::BaseQtVersion *const qtVersion
|
||||||
= QtSupport::QtKitInformation::qtVersion(d->kit);
|
= QtSupport::QtKitInformation::qtVersion(d->kit);
|
||||||
@@ -161,11 +160,11 @@ bool AbstractRemoteLinuxDeployService::hasChangedSinceLastDeployment(const Deplo
|
|||||||
|| deployableFile.localFilePath().toFileInfo().lastModified() > lastDeployed;
|
|| deployableFile.localFilePath().toFileInfo().lastModified() > lastDeployed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractRemoteLinuxDeployService::setBuildConfiguration(BuildConfiguration *bc)
|
void AbstractRemoteLinuxDeployService::setTarget(Target *target)
|
||||||
{
|
{
|
||||||
d->buildConfiguration = bc;
|
d->target = target;
|
||||||
if (bc && bc->target())
|
if (target)
|
||||||
d->kit = bc->target()->kit();
|
d->kit = target->kit();
|
||||||
else
|
else
|
||||||
d->kit = 0;
|
d->kit = 0;
|
||||||
d->deviceConfiguration = DeviceKitInformation::device(d->kit);
|
d->deviceConfiguration = DeviceKitInformation::device(d->kit);
|
||||||
|
@@ -40,9 +40,9 @@
|
|||||||
namespace QSsh { class SshConnection; }
|
namespace QSsh { class SshConnection; }
|
||||||
|
|
||||||
namespace ProjectExplorer {
|
namespace ProjectExplorer {
|
||||||
class BuildConfiguration;
|
|
||||||
class DeployableFile;
|
class DeployableFile;
|
||||||
class Kit;
|
class Kit;
|
||||||
|
class Target;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
explicit AbstractRemoteLinuxDeployService(QObject *parent = 0);
|
explicit AbstractRemoteLinuxDeployService(QObject *parent = 0);
|
||||||
~AbstractRemoteLinuxDeployService();
|
~AbstractRemoteLinuxDeployService();
|
||||||
|
|
||||||
void setBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
|
void setTarget(ProjectExplorer::Target *bc);
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ signals:
|
|||||||
void stdErrData(const QString &data);
|
void stdErrData(const QString &data);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
const ProjectExplorer::BuildConfiguration *buildConfiguration() const;
|
const ProjectExplorer::Target *target() const;
|
||||||
const ProjectExplorer::Kit *profile() const;
|
const ProjectExplorer::Kit *profile() const;
|
||||||
ProjectExplorer::IDevice::ConstPtr deviceConfiguration() const;
|
ProjectExplorer::IDevice::ConstPtr deviceConfiguration() const;
|
||||||
QSsh::SshConnection *connection() const;
|
QSsh::SshConnection *connection() const;
|
||||||
|
@@ -83,7 +83,7 @@ QVariantMap AbstractRemoteLinuxDeployStep::toMap() const
|
|||||||
bool AbstractRemoteLinuxDeployStep::init()
|
bool AbstractRemoteLinuxDeployStep::init()
|
||||||
{
|
{
|
||||||
QString error;
|
QString error;
|
||||||
deployService()->setBuildConfiguration(target()->activeBuildConfiguration());
|
deployService()->setTarget(target());
|
||||||
const bool canDeploy = initInternal(&error);
|
const bool canDeploy = initInternal(&error);
|
||||||
if (!canDeploy)
|
if (!canDeploy)
|
||||||
emit addOutput(tr("Cannot deploy: %1").arg(error), ErrorMessageOutput);
|
emit addOutput(tr("Cannot deploy: %1").arg(error), ErrorMessageOutput);
|
||||||
|
Reference in New Issue
Block a user