SshRemoteProcessRunner: Get rid of no-op call to QtcProcess::terminate()

Calling QtcProcess::terminate() after disconecting from
process signals is a task for implicit ProcessReaper.
Delete the process instead.

Change-Id: I02d9b892125b1a1053aefe8edbc7bc96bac41381
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-03-25 18:33:06 +01:00
parent 8da44324e7
commit a3c531c2a3

View File

@@ -158,11 +158,8 @@ void SshRemoteProcessRunner::setState(int newState)
d->m_state = static_cast<State>(newState);
if (d->m_state == Inactive) {
if (d->m_process) {
disconnect(d->m_process.get(), nullptr, this, nullptr);
d->m_process->terminate();
if (d->m_process)
d->m_process.reset();
}
if (d->m_connection) {
disconnect(d->m_connection, nullptr, this, nullptr);
SshConnectionManager::releaseConnection(d->m_connection);