From 9a493f8b83b124b5835f1b124fcae740ab78148d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 20 Oct 2017 17:59:51 +0200 Subject: [PATCH] Fix using (local) custom run configuration with non-Desktop kits For targets such as remote Linux, we would run all run configurations on the remote device, even "custom run configuration", which is explicitly intended for running locally. Task-number: QTCREATORBUG-19121 Change-Id: I83d6bdd8a47440047d230266845286715432604a Reviewed-by: hjk --- src/plugins/projectexplorer/runconfiguration.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index b56f1d683ea..c249d88cb3b 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -616,7 +616,10 @@ public: runnable = runConfiguration->runnable(); displayName = runConfiguration->displayName(); outputFormatter = runConfiguration->createOutputFormatter(); - device = DeviceKitInformation::device(runConfiguration->target()->kit()); + if (runnable.is()) + device = runnable.as().device; + if (!device) + device = DeviceKitInformation::device(runConfiguration->target()->kit()); project = runConfiguration->target()->project(); } else { outputFormatter = new OutputFormatter();