From dcc61b854a0a61be8620eb8fb88050d11fa00e06 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Fri, 25 Mar 2022 12:21:02 +0100 Subject: [PATCH] IDevice: Add rootPath() method May be useful for constructing other remote paths. Change-Id: I83b647f657565bf99e507a1821cf1c3c49a100bb Reviewed-by: hjk --- src/plugins/projectexplorer/devicesupport/idevice.cpp | 9 +++++++++ src/plugins/projectexplorer/devicesupport/idevice.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 70b61107635..23a935ebd28 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -773,6 +773,15 @@ void IDevice::setMachineType(MachineType machineType) d->machineType = machineType; } +FilePath IDevice::rootPath() const +{ + FilePath root; + root.setScheme("device"); + root.setHost(id().toString()); + root.setPath("/"); + return root; +} + FilePath IDevice::debugServerPath() const { return d->debugServerPath; diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index 9d724fbd150..b85abc32ae5 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -208,6 +208,8 @@ public: MachineType machineType() const; void setMachineType(MachineType machineType); + Utils::FilePath rootPath() const; + Utils::FilePath debugServerPath() const; void setDebugServerPath(const Utils::FilePath &path);