aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/utils/terminalinterface.cpp
diff options
context:
space:
mode:
authorMarcus Tillmanns <[email protected]>2023-06-14 11:11:20 +0200
committerMarcus Tillmanns <[email protected]>2023-06-14 13:51:49 +0000
commit79dd731d876fee2413cf9893a84286258ac65fde (patch)
tree0edb205b069e3123a8f18835a72d78b21e1c96d9 /src/libs/utils/terminalinterface.cpp
parent43862f4cd4ce898a959f8aa0a841674ee079f32c (diff)
Utils: Add Extra Data to Terminal process
Allows a terminal to display the "correct" program name. Fixes: QTCREATORBUG-29281 Change-Id: I73dacf71078dd1407ddda7bbc33a93c5ad172cbf Reviewed-by: Jarek Kobus <[email protected]>
Diffstat (limited to 'src/libs/utils/terminalinterface.cpp')
-rw-r--r--src/libs/utils/terminalinterface.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/utils/terminalinterface.cpp b/src/libs/utils/terminalinterface.cpp
index cd48de6bc03..0054b60bd27 100644
--- a/src/libs/utils/terminalinterface.cpp
+++ b/src/libs/utils/terminalinterface.cpp
@@ -387,6 +387,10 @@ void TerminalInterface::start()
ProcessSetupData stubSetupData;
stubSetupData.m_commandLine = cmd;
+ stubSetupData.m_extraData[TERMINAL_SHELL_NAME]
+ = m_setup.m_extraData.value(TERMINAL_SHELL_NAME,
+ m_setup.m_commandLine.executable().fileName());
+
if (m_setup.m_runAsRoot && !HostOsInfo::isWindowsHost()) {
CommandLine rootCommand(FilePath("sudo").searchInPath(), {"-A"});
rootCommand.addCommandLineAsArgs(cmd);