From 24314562165588b56a318b3b8a846bf5deda7c41 Mon Sep 17 00:00:00 2001 From: Tobias Hunger Date: Tue, 24 Apr 2012 15:49:09 +0200 Subject: Profile introduction Introduce Profiles to store sets of values that describe a system/device. These profiles are held by a target, getting rid of much of the information stored in the Build-/Run-/DeployConfigurations, greatly simplifying those. This is a squash of the wip/profile branch which has been on gerrit for a while, rebased to current master. Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f Reviewed-by: Daniel Teske --- .../abstractremotelinuxdeployservice.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp') diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp index 7f84926544..a534857da2 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp @@ -34,7 +34,9 @@ #include "deployablefile.h" #include "linuxdeviceconfiguration.h" +#include #include +#include #include #include #include @@ -127,23 +129,32 @@ void AbstractRemoteLinuxDeployService::saveDeploymentTimeStamp(const DeployableF { if (!d->buildConfiguration) return; - const QtSupport::BaseQtVersion * const qtVersion = d->buildConfiguration->qtVersion(); + const QtSupport::BaseQtVersion *const qtVersion + = QtSupport::QtProfileInformation::qtVersion(d->buildConfiguration->target()->profile()); + QString systemRoot; + if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->buildConfiguration->target()->profile())) + systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->buildConfiguration->target()->profile()).toString(); if (!qtVersion || !qtVersion->isValid()) return; d->lastDeployed.insert(DeployParameters(deployableFile, - deviceConfiguration()->sshParameters().host, - qtVersion->systemRoot()), QDateTime::currentDateTime()); + deviceConfiguration()->sshParameters().host, + systemRoot), + QDateTime::currentDateTime()); } bool AbstractRemoteLinuxDeployService::hasChangedSinceLastDeployment(const DeployableFile &deployableFile) const { if (!d->buildConfiguration) return true; - const QtSupport::BaseQtVersion * const qtVersion = d->buildConfiguration->qtVersion(); + const QtSupport::BaseQtVersion *const qtVersion + = QtSupport::QtProfileInformation::qtVersion(d->buildConfiguration->target()->profile()); if (!qtVersion || !qtVersion->isValid()) return true; + QString systemRoot; + if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->buildConfiguration->target()->profile())) + systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->buildConfiguration->target()->profile()).toString(); const QDateTime &lastDeployed = d->lastDeployed.value(DeployParameters(deployableFile, - deviceConfiguration()->sshParameters().host, qtVersion->systemRoot())); + deviceConfiguration()->sshParameters().host, systemRoot)); return !lastDeployed.isValid() || QFileInfo(deployableFile.localFilePath).lastModified() > lastDeployed; } -- cgit v1.2.1