Utils/Ssh: Move SshRemoteProces::isRunning() to QtcProcess base

... and use it on a few places.

Change-Id: Id2cea709e355a46821a720e593740ac032888ced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
hjk
2021-11-22 11:21:35 +01:00
parent 9c0bc16e94
commit e64ce914f9
11 changed files with 20 additions and 20 deletions

View File

@@ -128,7 +128,7 @@ static CreateAvdInfo createAvdCommand(const AndroidConfig &config, const CreateA
.arg(avdManagerTool.toString(), arguments.join(' '));
return result;
}
QTC_CHECK(proc.state() == QProcess::Running);
QTC_CHECK(proc.isRunning());
proc.write(QByteArray("yes\n")); // yes to "Do you wish to create a custom hardware profile"
auto start = chrono::steady_clock::now();
@@ -151,7 +151,7 @@ static CreateAvdInfo createAvdCommand(const AndroidConfig &config, const CreateA
// The exit code is always 0, so we need to check stderr
// For now assume that any output at all indicates a error
errorOutput = QString::fromLocal8Bit(proc.readAllStandardError());
if (proc.state() != QProcess::Running)
if (!proc.isRunning())
break;
// For a sane input and command, process should finish before timeout.