Process: Get rid of setTimeoutS()

Add an extra arg to runBlocking() function instead.
Use std::chrono::seconds for timeout.

Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Jarek Kobus
2024-01-22 17:27:24 +01:00
parent f6be85b1d2
commit afc67468e6
33 changed files with 68 additions and 115 deletions

View File

@@ -572,12 +572,11 @@ Tasking::GroupItem AndroidDeployQtStep::runRecipe()
void AndroidDeployQtStep::runCommand(const CommandLine &command)
{
Process buildProc;
buildProc.setTimeoutS(2 * 60);
emit addOutput(Tr::tr("Package deploy: Running command \"%1\".").arg(command.toUserOutput()),
OutputFormat::NormalMessage);
buildProc.setCommand(command);
buildProc.runBlocking(EventLoopMode::On);
buildProc.runBlocking(std::chrono::minutes(2), EventLoopMode::On);
if (buildProc.result() != ProcessResult::FinishedWithSuccess)
reportWarningOrError(buildProc.exitMessage(), Task::Error);
}