forked from qt-creator/qt-creator
Utils: Replace FilePath::onDevice() by new FilePath::withMappedPath()
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order of b.withNewPath(a). Whether the (curretly docker-specific) path mapping is useful /there/, and whether some of the calls are needed at all is dubious. I added some FIXME and changed a few cases directly. Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -106,7 +106,7 @@ private:
|
||||
CommandLine createFallbackCommand(const CommandLine &cmdLine)
|
||||
{
|
||||
CommandLine result = cmdLine;
|
||||
result.setExecutable(cmdLine.executable().onDevice(m_devicePath));
|
||||
result.setExecutable(m_devicePath.withNewPath(cmdLine.executable().path()));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -497,7 +497,7 @@ CommandLine DockerDevicePrivate::withDockerExecCmd(const CommandLine &cmd,
|
||||
}
|
||||
|
||||
if (workDir && !workDir->isEmpty())
|
||||
dockerCmd.addArgs({"-w", workDir->onDevice(q->rootPath()).nativePath()});
|
||||
dockerCmd.addArgs({"-w", q->rootPath().withNewMappedPath(*workDir).nativePath()});
|
||||
|
||||
dockerCmd.addArg(m_container);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user