Terminal: Use QtcProcess to start terminal window

Previously DesktopDevice::openTerminal used custom code to open a
terminal window. This patch changes it to use QtcProcess with
TerminalMode::On.

This also removes the need for "openTerminal.py" on macOS.

Change-Id: Iec978bdd19487ff8e59dcd88c35c2d01b0681022
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-03-14 09:09:55 +01:00
parent 50a214de9e
commit 44074accc7
19 changed files with 102 additions and 216 deletions

View File

@@ -65,13 +65,7 @@ TerminalCommand TerminalCommand::defaultTerminalEmulator()
if (defaultTerm.command.isEmpty()) {
if (HostOsInfo::isMacHost()) {
const FilePath termCmd = FilePath::fromString(QCoreApplication::applicationDirPath())
/ "../Resources/scripts/openTerminal.py";
if (termCmd.exists())
defaultTerm = {termCmd, "", ""};
else
defaultTerm = {"/usr/X11/bin/xterm", "", "-e"};
return {"Terminal.app", "", ""};
} else if (HostOsInfo::isAnyUnixHost()) {
defaultTerm = {"xterm", "", "-e"};
const Environment env = Environment::systemEnvironment();