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

@@ -435,7 +435,6 @@ void DebuggerRunTool::setOverrideStartScript(const QString &script)
void DebuggerRunTool::setInferior(const Runnable &runnable)
{
m_runParameters.inferior = runnable;
setUseTerminal(m_runParameters.inferior.runMode == ApplicationLauncher::Console);
}
void DebuggerRunTool::setInferiorExecutable(const QString &executable)
@@ -839,6 +838,8 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, Kit *kit, bool allowTer
m_runParameters.displayName = runConfig->displayName();
if (auto symbolsAspect = runConfig->extraAspect<SymbolFileAspect>())
m_runParameters.symbolFile = symbolsAspect->value();
if (auto terminalAspect = runConfig->extraAspect<TerminalAspect>())
m_runParameters.useTerminal = terminalAspect->useTerminal();
}
if (runConfig && !kit)
@@ -865,7 +866,7 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, Kit *kit, bool allowTer
// Normalize to work around QTBUG-17529 (QtDeclarative fails with 'File name case mismatch'...)
m_runParameters.inferior.workingDirectory =
FileUtils::normalizePathName(m_runParameters.inferior.workingDirectory);
setUseTerminal(allowTerminal && m_runParameters.inferior.runMode == ApplicationLauncher::Console);
setUseTerminal(allowTerminal && m_runParameters.useTerminal);
const QByteArray envBinary = qgetenv("QTC_DEBUGGER_PATH");
if (!envBinary.isEmpty())