diff options
author | Marcus Tillmanns <marcus.tillmanns@qt.io> | 2024-04-02 12:31:48 +0200 |
---|---|---|
committer | Marcus Tillmanns <marcus.tillmanns@qt.io> | 2024-04-04 08:32:59 +0000 |
commit | c03fa4dbad40bee513da339af74ea7d99272b456 (patch) | |
tree | f8c80c2cd0ea484e0f749ef42dd5d7256bdf01fa | |
parent | 3067f57905738bc6575f9173d860e6ace2380c99 (diff) |
ProjectExplorer: Add Device::canMount
Change-Id: Icde98f845c3fe303d9461a0cbb0946d1ce9c8b00
Reviewed-by: hjk <hjk@qt.io>
-rw-r--r-- | src/plugins/docker/dockerdevice.h | 5 | ||||
-rw-r--r-- | src/plugins/projectexplorer/devicesupport/idevice.cpp | 5 | ||||
-rw-r--r-- | src/plugins/projectexplorer/devicesupport/idevice.h | 2 |
3 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/docker/dockerdevice.h b/src/plugins/docker/dockerdevice.h index ee4334b55b..e08a60cbc3 100644 --- a/src/plugins/docker/dockerdevice.h +++ b/src/plugins/docker/dockerdevice.h @@ -68,6 +68,11 @@ public: Utils::FilePath rootPath() const override; Utils::FilePath filePath(const QString &pathOnDevice) const override; + bool canMount(const Utils::FilePath &filePath) const override + { + return !filePath.needsDevice() || filePath.isSameDevice(rootPath()); + } + bool handlesFile(const Utils::FilePath &filePath) const override; bool ensureReachable(const Utils::FilePath &other) const override; Utils::expected_str<Utils::FilePath> localSource(const Utils::FilePath &other) const override; diff --git a/src/plugins/projectexplorer/devicesupport/idevice.cpp b/src/plugins/projectexplorer/devicesupport/idevice.cpp index 0fcdae1c91..115fb0e5fa 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.cpp +++ b/src/plugins/projectexplorer/devicesupport/idevice.cpp @@ -442,6 +442,11 @@ DeviceTester *IDevice::createDeviceTester() const return nullptr; } +bool IDevice::canMount(const Utils::FilePath &) const +{ + return false; +} + OsType IDevice::osType() const { return d->osType; diff --git a/src/plugins/projectexplorer/devicesupport/idevice.h b/src/plugins/projectexplorer/devicesupport/idevice.h index 6434b5b6dd..b83c558e87 100644 --- a/src/plugins/projectexplorer/devicesupport/idevice.h +++ b/src/plugins/projectexplorer/devicesupport/idevice.h @@ -151,6 +151,8 @@ public: virtual bool hasDeviceTester() const { return false; } virtual DeviceTester *createDeviceTester() const; + virtual bool canMount(const Utils::FilePath &filePath) const; + virtual DeviceProcessSignalOperation::Ptr signalOperation() const; enum DeviceState { DeviceReadyToUse, DeviceConnected, DeviceDisconnected, DeviceStateUnknown }; |