[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)
This commit is contained in:
parent
c28c97d3aa
commit
e0bb53aff4
@ -28,6 +28,7 @@
|
|||||||
#include "GlobalStorage.h"
|
#include "GlobalStorage.h"
|
||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
|
|
||||||
|
#include "utils/CalamaresUtilsSystem.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
DummyCppJob::DummyCppJob( QObject* parent )
|
DummyCppJob::DummyCppJob( QObject* parent )
|
||||||
@ -113,9 +114,10 @@ Calamares::JobResult
|
|||||||
DummyCppJob::exec()
|
DummyCppJob::exec()
|
||||||
{
|
{
|
||||||
// Ported from dummypython
|
// Ported from dummypython
|
||||||
QProcess::execute( "/bin/sh",
|
CalamaresUtils::System::runCommand( CalamaresUtils::System::RunLocation::RunInHost,
|
||||||
QStringList() << "-c"
|
QStringList() << "/bin/sh"
|
||||||
<< "touch ~/calamares-dummycpp" );
|
<< "-c"
|
||||||
|
<< "touch ~/calamares-dummycpp" );
|
||||||
QString accumulator = QDateTime::currentDateTimeUtc().toString( Qt::ISODate ) + '\n';
|
QString accumulator = QDateTime::currentDateTimeUtc().toString( Qt::ISODate ) + '\n';
|
||||||
accumulator += QStringLiteral( "Calamares version: " ) + CALAMARES_VERSION_SHORT + '\n';
|
accumulator += QStringLiteral( "Calamares version: " ) + CALAMARES_VERSION_SHORT + '\n';
|
||||||
accumulator += QStringLiteral( "This job's name: " ) + prettyName() + '\n';
|
accumulator += QStringLiteral( "This job's name: " ) + prettyName() + '\n';
|
||||||
|
Loading…
Reference in New Issue
Block a user