From 66bff3f1f1e11e6bf839de6e26a01d17d182fc1e Mon Sep 17 00:00:00 2001 From: Daniel Teske <daniel.teske@digia.com> Date: Thu, 6 Dec 2012 19:21:19 +0100 Subject: [PATCH] RemoteLinuxDeployService: Remove superfluous dependency on bc Change-Id: I214bf081192c4071d4082623792f7a12a9de61c8 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> --- src/plugins/madde/maemodeploybymountsteps.cpp | 6 +++--- .../abstractremotelinuxdeployservice.cpp | 19 +++++++++---------- .../abstractremotelinuxdeployservice.h | 6 +++--- .../abstractremotelinuxdeploystep.cpp | 2 +- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/src/plugins/madde/maemodeploybymountsteps.cpp b/src/plugins/madde/maemodeploybymountsteps.cpp index 5b58e32e768..dcf80da45cf 100644 --- a/src/plugins/madde/maemodeploybymountsteps.cpp +++ b/src/plugins/madde/maemodeploybymountsteps.cpp @@ -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(); } diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp index 60bde725dbf..1801eb9b5e3 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp @@ -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); diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h index 15c455680f2..cc75582537e 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h @@ -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; diff --git a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp index e3b7766361d..930b02924b3 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp @@ -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); -- GitLab