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

@@ -148,6 +148,7 @@ public:
QString serverAddress;
Runnable runnable;
bool breakAtMain = false;
bool runInTerminal = false;
QString serverStartScript;
QString debugInfoLocation;
};
@@ -159,7 +160,7 @@ bool StartApplicationParameters::equals(const StartApplicationParameters &rhs) c
&& runnable.commandLineArguments == rhs.runnable.commandLineArguments
&& runnable.workingDirectory == rhs.runnable.workingDirectory
&& breakAtMain == rhs.breakAtMain
&& runnable.runMode == rhs.runnable.runMode
&& runInTerminal == rhs.runInTerminal
&& serverStartScript == rhs.serverStartScript
&& kitId == rhs.kitId
&& debugInfoLocation == rhs.debugInfoLocation
@@ -195,7 +196,7 @@ void StartApplicationParameters::toSettings(QSettings *settings) const
settings->setValue("LastExternalExecutableArguments", runnable.commandLineArguments);
settings->setValue("LastExternalWorkingDirectory", runnable.workingDirectory);
settings->setValue("LastExternalBreakAtMain", breakAtMain);
settings->setValue("LastExternalRunInTerminal", runnable.runMode == ApplicationLauncher::Console);
settings->setValue("LastExternalRunInTerminal", runInTerminal);
settings->setValue("LastServerStartScript", serverStartScript);
settings->setValue("LastDebugInfoLocation", debugInfoLocation);
}
@@ -209,8 +210,7 @@ void StartApplicationParameters::fromSettings(const QSettings *settings)
runnable.commandLineArguments = settings->value("LastExternalExecutableArguments").toString();
runnable.workingDirectory = settings->value("LastExternalWorkingDirectory").toString();
breakAtMain = settings->value("LastExternalBreakAtMain").toBool();
runnable.runMode = settings->value("LastExternalRunInTerminal").toBool()
? ApplicationLauncher::Console : ApplicationLauncher::Gui;
runInTerminal = settings->value("LastExternalRunInTerminal").toBool();
serverStartScript = settings->value("LastServerStartScript").toString();
debugInfoLocation = settings->value("LastDebugInfoLocation").toString();
}
@@ -469,8 +469,7 @@ StartApplicationParameters StartApplicationDialog::parameters() const
result.runnable.commandLineArguments = d->arguments->text();
result.runnable.workingDirectory = d->workingDirectory->path();
result.breakAtMain = d->breakAtMainCheckBox->isChecked();
result.runnable.runMode = d->runInTerminalCheckBox->isChecked()
? ApplicationLauncher::Console : ApplicationLauncher::Gui;
result.runInTerminal = d->runInTerminalCheckBox->isChecked();
return result;
}
@@ -484,7 +483,7 @@ void StartApplicationDialog::setParameters(const StartApplicationParameters &p)
d->debuginfoPathChooser->setPath(p.debugInfoLocation);
d->arguments->setText(p.runnable.commandLineArguments);
d->workingDirectory->setPath(p.runnable.workingDirectory);
d->runInTerminalCheckBox->setChecked(p.runnable.runMode == ApplicationLauncher::Console);
d->runInTerminalCheckBox->setChecked(p.runInTerminal);
d->breakAtMainCheckBox->setChecked(p.breakAtMain);
updateState();
}