diff options
author | hjk <qthjk@ovi.com> | 2012-07-25 17:36:35 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@nokia.com> | 2012-07-26 10:35:02 +0200 |
commit | 0fcd30cc6191925ea3cba2baad6533a946c9ccd2 (patch) | |
tree | 19794335c39ed8d4a698deb1b40506aea5dbc529 /src/plugins/remotelinux | |
parent | 1bbcfd17a9a78107e5f09d1287ae19459f31ab8f (diff) | |
download | qt-creator-0fcd30cc6191925ea3cba2baad6533a946c9ccd2.tar.gz |
madde: prefer using Profile instead of qt4BuildConfiguration etc
Change-Id: I6fe64f7a4a5713c09ea02460a958758d0938fc19
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux')
-rw-r--r-- | src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp | 24 | ||||
-rw-r--r-- | src/plugins/remotelinux/abstractremotelinuxdeployservice.h | 8 |
2 files changed, 20 insertions, 12 deletions
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp index 2b6f2c8b6c..ccc988dbd6 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp @@ -84,10 +84,11 @@ class AbstractRemoteLinuxDeployServicePrivate { public: AbstractRemoteLinuxDeployServicePrivate() - : connection(0), state(Inactive), stopRequested(false) {} + : profile(0), connection(0), state(Inactive), stopRequested(false) {} LinuxDeviceConfiguration::ConstPtr deviceConfiguration; QPointer<Qt4BuildConfiguration> buildConfiguration; + ProjectExplorer::Profile *profile; SshConnection *connection; State state; bool stopRequested; @@ -113,6 +114,11 @@ const Qt4BuildConfiguration *AbstractRemoteLinuxDeployService::qt4BuildConfigura return d->buildConfiguration; } +const ProjectExplorer::Profile *AbstractRemoteLinuxDeployService::profile() const +{ + return d->profile; +} + LinuxDeviceConfiguration::ConstPtr AbstractRemoteLinuxDeployService::deviceConfiguration() const { return d->deviceConfiguration; @@ -128,10 +134,10 @@ void AbstractRemoteLinuxDeployService::saveDeploymentTimeStamp(const DeployableF if (!d->buildConfiguration) return; const QtSupport::BaseQtVersion *const qtVersion - = QtSupport::QtProfileInformation::qtVersion(d->buildConfiguration->target()->profile()); + = QtSupport::QtProfileInformation::qtVersion(d->profile); QString systemRoot; - if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->buildConfiguration->target()->profile())) - systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->buildConfiguration->target()->profile()).toString(); + if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->profile)) + systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->profile).toString(); if (!qtVersion || !qtVersion->isValid()) return; d->lastDeployed.insert(DeployParameters(deployableFile, @@ -145,12 +151,12 @@ bool AbstractRemoteLinuxDeployService::hasChangedSinceLastDeployment(const Deplo if (!d->buildConfiguration) return true; const QtSupport::BaseQtVersion *const qtVersion - = QtSupport::QtProfileInformation::qtVersion(d->buildConfiguration->target()->profile()); + = QtSupport::QtProfileInformation::qtVersion(d->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(); + if (ProjectExplorer::SysRootProfileInformation::hasSysRoot(d->profile)) + systemRoot = ProjectExplorer::SysRootProfileInformation::sysRoot(d->profile).toString(); const QDateTime &lastDeployed = d->lastDeployed.value(DeployParameters(deployableFile, deviceConfiguration()->sshParameters().host, systemRoot)); return !lastDeployed.isValid() @@ -165,6 +171,10 @@ void AbstractRemoteLinuxDeployService::setDeviceConfiguration(const LinuxDeviceC void AbstractRemoteLinuxDeployService::setBuildConfiguration(Qt4BuildConfiguration *bc) { d->buildConfiguration = bc; + if (bc && bc->target()) + d->profile = bc->target()->profile(); + else + d->profile = 0; } void AbstractRemoteLinuxDeployService::start() diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h index cba3a87f5e..b54a34b2e6 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h @@ -35,13 +35,10 @@ #include <QObject> #include <QSharedPointer> #include <QVariantMap> -QT_FORWARD_DECLARE_CLASS(QString) namespace QSsh { class SshConnection; } - -namespace Qt4ProjectManager { -class Qt4BuildConfiguration; -} +namespace Qt4ProjectManager { class Qt4BuildConfiguration; } +namespace ProjectExplorer { class Profile; } namespace RemoteLinux { class DeployableFile; @@ -79,6 +76,7 @@ signals: protected: const Qt4ProjectManager::Qt4BuildConfiguration *qt4BuildConfiguration() const; + const ProjectExplorer::Profile *profile() const; QSharedPointer<const LinuxDeviceConfiguration> deviceConfiguration() const; QSsh::SshConnection *connection() const; |