From e0bb53aff4130a2c06cbecd86c2fd7b715c5c4bb Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Aug 2019 13:34:26 +0200 Subject: [PATCH] [dummycpp] Replace QProcess::execute() - hangs unpredictably during testing - replace with the Calamares process-invocation runCommand(), which is also synchronous but doesn't hang (or, hasn't, in testing so far) --- src/modules/dummycpp/DummyCppJob.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/dummycpp/DummyCppJob.cpp b/src/modules/dummycpp/DummyCppJob.cpp index a38cddc40..5a2ca1803 100644 --- a/src/modules/dummycpp/DummyCppJob.cpp +++ b/src/modules/dummycpp/DummyCppJob.cpp @@ -28,6 +28,7 @@ #include "GlobalStorage.h" #include "JobQueue.h" +#include "utils/CalamaresUtilsSystem.h" #include "utils/Logger.h" DummyCppJob::DummyCppJob( QObject* parent ) @@ -113,9 +114,10 @@ Calamares::JobResult DummyCppJob::exec() { // Ported from dummypython - QProcess::execute( "/bin/sh", - QStringList() << "-c" - << "touch ~/calamares-dummycpp" ); + CalamaresUtils::System::runCommand( CalamaresUtils::System::RunLocation::RunInHost, + QStringList() << "/bin/sh" + << "-c" + << "touch ~/calamares-dummycpp" ); QString accumulator = QDateTime::currentDateTimeUtc().toString( Qt::ISODate ) + '\n'; accumulator += QStringLiteral( "Calamares version: " ) + CALAMARES_VERSION_SHORT + '\n'; accumulator += QStringLiteral( "This job's name: " ) + prettyName() + '\n';