Fix terminal command on macOS

After 4c88c1808c the terminal command
itself may no longer have quoted spaces (since it is directly passed to
QProcess as the program name).

Change-Id: Iee4b9a6c3a87c29cb29cc732f6027f1c742f9eb5
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Eike Ziller
2018-09-05 16:36:57 +02:00
parent c16c477333
commit 019092d7f6

View File

@@ -350,9 +350,10 @@ TerminalCommand ConsoleProcess::defaultTerminalEmulator()
if (defaultTerm.command.isEmpty()) {
defaultTerm = []() -> TerminalCommand {
if (HostOsInfo::isMacHost()) {
QString termCmd = QCoreApplication::applicationDirPath() + "/../Resources/scripts/openTerminal.command";
const QString termCmd = QCoreApplication::applicationDirPath()
+ "/../Resources/scripts/openTerminal.command";
if (QFileInfo::exists(termCmd))
return {termCmd.replace(' ', "\\ "), "", ""};
return {termCmd, "", ""};
return {"/usr/X11/bin/xterm", "", "-e"};
}
const Environment env = Environment::systemEnvironment();