From 63a472a81a6f7db18428d4c69ebbc0370d1dca2c Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 16 Oct 2017 17:01:06 +0200 Subject: [PATCH] Fix run control startup message for remote targets on Windows The exectuable path in the user output was always converted to native separators, even for non-Desktop targets. Change-Id: I5b43b2da8a2b791472a1fd58940b179dcbaa28d0 Reviewed-by: hjk --- src/plugins/projectexplorer/runconfiguration.cpp | 9 +++++++-- src/plugins/projectexplorer/runnables.h | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index ac5910a67a1..9e3d3339c7b 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -1409,10 +1409,15 @@ void SimpleTargetRunner::start() m_stopReported = false; m_launcher.disconnect(this); - QString msg = RunControl::tr("Starting %1...").arg(m_runnable.displayName()); + const bool isDesktop = isSynchronousLauncher(runControl()); + const QString rawDisplayName = m_runnable.displayName(); + const QString displayName = isDesktop + ? QDir::toNativeSeparators(rawDisplayName) + : rawDisplayName; + const QString msg = RunControl::tr("Starting %1...").arg(displayName); appendMessage(msg, Utils::NormalMessageFormat); - if (isSynchronousLauncher(runControl())) { + if (isDesktop) { connect(&m_launcher, &ApplicationLauncher::appendMessage, this, &SimpleTargetRunner::appendMessage); diff --git a/src/plugins/projectexplorer/runnables.h b/src/plugins/projectexplorer/runnables.h index a893545d23a..d5b27c7e45c 100644 --- a/src/plugins/projectexplorer/runnables.h +++ b/src/plugins/projectexplorer/runnables.h @@ -32,7 +32,6 @@ #include -#include #include namespace ProjectExplorer { @@ -47,7 +46,9 @@ public: ApplicationLauncher::Mode runMode = ApplicationLauncher::Gui; IDevice::ConstPtr device; // Override the kit's device. Keep unset by default. - QString displayName() const { return QDir::toNativeSeparators(executable); } + // FIXME: Not necessarily a display name + QString displayName() const { return executable; } + static void *staticTypeId; };