Utils: Sanitize FilePath::onDevice()

It's one entry in the FilePath world, so it should start with a QString.

Change-Id: Ib2693f52d56103a4c37ba7361b191c2a5c2a72f8
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
hjk
2022-11-16 15:07:25 +01:00
parent 213d60ad64
commit f59ca97a84
5 changed files with 16 additions and 20 deletions

View File

@@ -29,9 +29,12 @@ namespace Utils {
DeviceFileAccess::~DeviceFileAccess() = default;
QString DeviceFileAccess::mapToDevicePath(const FilePath &filePath) const
// This takes a \a hostPath, typically the same as used with QFileInfo
// and returns the path component of a universal FilePath. Host and scheme
// of the latter are added by a higher level to form a FilePath.
QString DeviceFileAccess::mapToDevicePath(const QString &hostPath) const
{
return filePath.path();
return hostPath;
}
bool DeviceFileAccess::isExecutableFile(const FilePath &filePath) const