Remove ApplicationLauncher::Mode

The actual remaining use was to pop up a terminal in some
setups where Mode == Console, with a default of Gui meaning
"no console". In some downstream uses it was used set to
Console (probably to mean "this helper process does not need
a gui") but then luckily ignored when actually starting the
helper processes.

All cases where the console is useful and requested are
nowadays RunWorkers belonging to RunConfigurations with
a TerminalAspect, so they can directly get the relevant bit
from their RunConfiguration without having it part of
all StandardRunnables.

Change-Id: I1368d5968da5cf672656aebf200ccac8d45335d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2018-05-03 18:15:49 +02:00
parent d384e2398a
commit 0fbb2839f9
20 changed files with 52 additions and 62 deletions

View File

@@ -466,8 +466,6 @@ Runnable RunConfiguration::runnable() const
r.workingDirectory = aspect->workingDirectory().toString();
if (auto aspect = extraAspect<EnvironmentAspect>())
r.environment = aspect->environment();
if (auto aspect = extraAspect<TerminalAspect>())
r.runMode = aspect->runMode();
return r;
}
@@ -1644,12 +1642,17 @@ SimpleTargetRunner::SimpleTargetRunner(RunControl *runControl)
setDisplayName("SimpleTargetRunner");
m_runnable = runControl->runnable(); // Default value. Can be overridden using setRunnable.
m_device = runControl->device(); // Default value. Can be overridden using setDevice.
if (auto runConfig = runControl->runConfiguration()) {
if (auto terminalAspect = runConfig->extraAspect<TerminalAspect>())
m_useTerminal = terminalAspect->useTerminal();
}
}
void SimpleTargetRunner::start()
{
m_stopReported = false;
m_launcher.disconnect(this);
m_launcher.setUseTerminal(m_useTerminal);
const bool isDesktop = m_device.isNull()
|| m_device->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;