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