Simplify RemoteLinuxCheckForFreeDiskSpaceService

Use FilePath::bytesAvailable() on remote device instead.

Change-Id: I2431641ea2f4c090439e0380a378e39aa617540a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Jarek Kobus
2022-01-04 18:06:42 +01:00
parent 71626a7d16
commit 79ce29b5a1
5 changed files with 42 additions and 69 deletions

View File

@@ -403,6 +403,20 @@ QString LinuxDevice::userAtHost() const
return sshParameters().userName() + '@' + sshParameters().host();
}
FilePath LinuxDevice::mapToGlobalPath(const FilePath &pathOnDevice) const
{
if (pathOnDevice.needsDevice()) {
// Already correct form, only sanity check it's ours...
QTC_CHECK(handlesFile(pathOnDevice));
return pathOnDevice;
}
FilePath result;
result.setScheme("ssh");
result.setHost(userAtHost());
result.setPath(pathOnDevice.path());
return result;
}
bool LinuxDevice::handlesFile(const FilePath &filePath) const
{
return filePath.scheme() == "ssh" && filePath.host() == userAtHost();