Style: run modulesystem through the style guide

This commit is contained in:
Adriaan de Groot 2018-06-18 10:56:10 -04:00
parent 58121abf06
commit 1a097f8c49
10 changed files with 61 additions and 78 deletions

View file

@ -22,7 +22,8 @@
#include <QDir>
namespace Calamares {
namespace Calamares
{
Module::Type
@ -68,23 +69,17 @@ ProcessJobModule::initFrom( const QVariantMap& moduleDescriptor )
m_workingPath = directory.absolutePath();
if ( !moduleDescriptor.value( "command" ).toString().isEmpty() )
{
m_command = moduleDescriptor.value( "command" ).toString();
}
m_secondsTimeout = 30;
if ( moduleDescriptor.contains( "timeout" ) &&
!moduleDescriptor.value( "timeout" ).isNull() )
{
!moduleDescriptor.value( "timeout" ).isNull() )
m_secondsTimeout = moduleDescriptor.value( "timeout" ).toInt();
}
m_runInChroot = false;
if ( moduleDescriptor.contains( "chroot" )&&
!moduleDescriptor.value( "chroot" ).isNull() )
{
!moduleDescriptor.value( "chroot" ).isNull() )
m_runInChroot = moduleDescriptor.value( "chroot" ).toBool();
}
}