forked from qt-creator/qt-creator
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user