Fix starting remote process in terminal

SshDeviceProcess::start() is overridden and it starts
connecting phase. It marks the current state as
Starting. Later, when connection is being established,
it calls back the base QtcProcess::start() and it
fails on assert. This doesn't happen when starting
not in terminal, as in this case SshDeviceProcess
delegates the start to the aggregated SshRemoteProcess
instead of calling QtcProcess::start().

Disabling the assert for a while, until we de-virtualize
the public interface back again, as from the public
API side it's still a valid assert.

Change-Id: I0d62ec0db778f68fcc5afa4a6f08d54f98d74e4f
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-02-17 11:58:08 +01:00
parent 0b08b24682
commit 531e24892b

View File

@@ -774,7 +774,8 @@ void QtcProcess::setUseCtrlCStub(bool enabled)
void QtcProcess::start()
{
QTC_ASSERT(state() == QProcess::NotRunning, return);
// TODO: Uncomment when we de-virtualize start()
// QTC_ASSERT(state() == QProcess::NotRunning, return);
if (d->m_setup.m_commandLine.executable().needsDevice()) {
QTC_ASSERT(s_deviceHooks.startProcessHook, return);