Terminal: Fix incorrect signal connection

The "process" exiting does not necessarily correspond to the
stub exiting. As an example, on linux, gnome-terminal will immediately
spawn a new process for the new terminal window and exit itself.
The stub will then simply run in the detached terminal window.

Fixes: QTCREATORBUG-29488
Change-Id: Ifac0795495901b80638bd10d720b036c09f0146c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-09-06 08:38:12 +02:00
parent 9b25ab5329
commit 7986776f58

View File

@@ -111,8 +111,6 @@ expected_str<qint64> ProcessStubCreator::startStubProcess(const ProcessSetupData
if (detached) if (detached)
QObject::connect(process, &Process::done, process, &Process::deleteLater); QObject::connect(process, &Process::done, process, &Process::deleteLater);
QObject::connect(process, &Process::done, m_interface, &TerminalInterface::onStubExited);
process->setWorkingDirectory(setupData.m_workingDirectory); process->setWorkingDirectory(setupData.m_workingDirectory);
if constexpr (HostOsInfo::isWindowsHost()) { if constexpr (HostOsInfo::isWindowsHost()) {