From adb052be87efca17d989cc17516278e3af6f5dcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20N=C3=A4tterlund?= <tobias.naetterlund.qnx@kdab.com> Date: Mon, 10 Feb 2014 09:49:55 +0100 Subject: [PATCH] RemoteLinux: Use AbstractRemoteLinuxDeployService without target Made it possible to use AbstractRemoteLinuxDeployService without a target or a configured kit, by simply setting a device Change-Id: I9a11c6d9472dff30bc8512bcf333c1dd7ccfee76 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com> --- src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp | 5 +++++ src/plugins/remotelinux/abstractremotelinuxdeployservice.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp index 3887f6bbe54..7c2d9064281 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.cpp @@ -162,6 +162,11 @@ void AbstractRemoteLinuxDeployService::setTarget(Target *target) d->deviceConfiguration = DeviceKitInformation::device(d->kit); } +void AbstractRemoteLinuxDeployService::setDevice(const IDevice::ConstPtr &device) +{ + d->deviceConfiguration = device; +} + void AbstractRemoteLinuxDeployService::start() { QTC_ASSERT(d->state == Inactive, return); diff --git a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h index 94b7216fb49..84e0bb96c93 100644 --- a/src/plugins/remotelinux/abstractremotelinuxdeployservice.h +++ b/src/plugins/remotelinux/abstractremotelinuxdeployservice.h @@ -56,6 +56,8 @@ public: ~AbstractRemoteLinuxDeployService(); void setTarget(ProjectExplorer::Target *bc); + // Only use setDevice() as fallback if no target is available + void setDevice(const ProjectExplorer::IDevice::ConstPtr &device); void start(); void stop(); -- GitLab