From 1ffaf0139af4946b1965de6ea341db4f4577c224 Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 10 May 2022 15:33:33 +0200 Subject: ProjectExplorer: Introduce a IDevice::filePath Same function as mapToGlobalPath, but operating on a QString specifying the local path part. It's the majority use case and arguably the 'right thing' to use instead of a full FilePath that can refer to arbitrary devices. Change-Id: Ifc8bd340e2e8859fe549f5724eb94269f587c418 Reviewed-by: Jarek Kobus --- src/plugins/remotelinux/remotelinuxpackageinstaller.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/remotelinux/remotelinuxpackageinstaller.cpp') diff --git a/src/plugins/remotelinux/remotelinuxpackageinstaller.cpp b/src/plugins/remotelinux/remotelinuxpackageinstaller.cpp index adf82fbc07c..e4757663ec1 100644 --- a/src/plugins/remotelinux/remotelinuxpackageinstaller.cpp +++ b/src/plugins/remotelinux/remotelinuxpackageinstaller.cpp @@ -76,7 +76,7 @@ void AbstractRemoteLinuxPackageInstaller::installPackage(const IDevice::ConstPtr QString cmdLine = installCommandLine(packageFilePath); if (removePackageFile) cmdLine += QLatin1String(" && (rm ") + packageFilePath + QLatin1String(" || :)"); - d->m_installer.setCommand({d->m_device->mapToGlobalPath("/bin/sh"), {"-c", cmdLine}}); + d->m_installer.setCommand({d->m_device->filePath("/bin/sh"), {"-c", cmdLine}}); d->m_installer.start(); } @@ -84,7 +84,7 @@ void AbstractRemoteLinuxPackageInstaller::cancelInstallation() { QTC_ASSERT(d->m_installer.state() != QProcess::NotRunning, return); - d->m_killer.setCommand({d->m_device->mapToGlobalPath("/bin/sh"), + d->m_killer.setCommand({d->m_device->filePath("/bin/sh"), {"-c", cancelInstallationCommandLine()}}); d->m_killer.start(); d->m_installer.close(); -- cgit v1.2.3