ProjectExplorer: Replace remaining uses of Runnable::device

Change-Id: I2d42269eb6ad971fcedb118acb7e6e1dfbff83b2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2022-05-25 14:19:27 +02:00
parent 3653456c4f
commit 4520f93f2e
2 changed files with 3 additions and 3 deletions

View File

@@ -3935,7 +3935,7 @@ void ProjectExplorerPluginPrivate::openTerminalHereWithRunEnv()
QTC_ASSERT(runConfig, return);
const Runnable runnable = runConfig->runnable();
IDevice::ConstPtr device = runnable.device;
IDevice::ConstPtr device = DeviceManager::deviceForPath(runnable.command.executable());
if (!device)
device = DeviceKitAspect::device(target->kit());
QTC_ASSERT(device && device->canOpenTerminal(), return);

View File

@@ -447,8 +447,8 @@ void RunControl::setKit(Kit *kit)
d->kit = kit;
d->macroExpander = kit->macroExpander();
if (d->runnable.device)
setDevice(d->runnable.device);
if (!d->runnable.command.isEmpty())
setDevice(DeviceManager::deviceForPath(d->runnable.command.executable()));
else
setDevice(DeviceKitAspect::device(kit));
}