From e99fa02913fe614e8090539cdecf3e346dddc65e Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 10 May 2022 12:53:27 +0200 Subject: [PATCH] ProjectExplorer: Fix Introduce IDevice::filePath() Amends 1ffaf0139af49. This is the actual introduction that got merged into the wrong patch. Change-Id: I836a214358bd6000eaf506ee7d1fed8ad178daa3 Reviewed-by: Jarek Kobus --- src/plugins/projectexplorer/devicesupport/idevice.cpp | 5 +++++ src/plugins/projectexplorer/devicesupport/idevice.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 8fbae8a6710..067f6a244a2 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -221,6 +221,11 @@ QString IDevice::mapToDevicePath(const FilePath &globalPath) const return globalPath.path(); } +FilePath IDevice::filePath(const QString &pathOnDevice) const +{ + return mapToGlobalPath(FilePath::fromString(pathOnDevice)); +} + bool IDevice::handlesFile(const FilePath &filePath) const { Q_UNUSED(filePath); diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index 000424dfb44..f5424c1ce00 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -208,6 +208,7 @@ public: void setMachineType(MachineType machineType); Utils::FilePath rootPath() const; + Utils::FilePath filePath(const QString &pathOnDevice) const; Utils::FilePath debugServerPath() const; void setDebugServerPath(const Utils::FilePath &path);