Fix debugging on iOS

The RunControl nowadays asks
DeviceManager::deviceForPath(runnable.command.executable) to get the
device, instead of passing that through the runnable.

Since the runnable's command executable is set via
IDevice::filePath(pathOnDevice), where "pathOnDevice" by default is from
the executableAspect, IDevice::filePath should actually return a
"global" path in the form of "device://<device-id>/<path-on-device>".

Since we do not want "device:...." paths for the desktop, return the
simple path in that case only instead.

Fixes: QTCREATORBUG-27709
Change-Id: I75f9406cf3254980e1fee203275b0e72202b7b6d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2022-06-13 17:10:03 +02:00
parent 4e69aece65
commit fd90cf0a82
5 changed files with 20 additions and 17 deletions

View File

@@ -1104,20 +1104,6 @@ QString LinuxDevice::userAtHost() const
return sshParameters().userAtHost();
}
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("device");
result.setHost(id().toString());
result.setPath(pathOnDevice.path());
return result;
}
bool LinuxDevice::handlesFile(const FilePath &filePath) const
{
if (filePath.scheme() == "device" && filePath.host() == id().toString())