Provide sane defaults for restart command, and make it optional.
CAL-372 #close
This commit is contained in:
parent
936e7fab7c
commit
326ff5e724
@ -117,13 +117,20 @@ FinishedViewStep::setConfigurationMap( const QVariantMap& configurationMap )
|
||||
if ( restartNowEnabled )
|
||||
{
|
||||
if ( configurationMap.contains( "restartNowChecked" ) &&
|
||||
configurationMap.value( "restartNowChecked" ).type() == QVariant::Bool &&
|
||||
configurationMap.contains( "restartNowCommand" ) &&
|
||||
configurationMap.value( "restartNowCommand" ).type() == QVariant::String )
|
||||
configurationMap.value( "restartNowChecked" ).type() == QVariant::Bool )
|
||||
{
|
||||
m_widget->setRestartNowChecked( configurationMap.value( "restartNowChecked" ).toBool() );
|
||||
}
|
||||
|
||||
if ( configurationMap.contains( "restartNowCommand" ) &&
|
||||
configurationMap.value( "restartNowCommand" ).type() == QVariant::String )
|
||||
{
|
||||
m_widget->setRestartNowCommand( configurationMap.value( "restartNowCommand" ).toString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_widget->setRestartNowCommand( "systemctl reboot");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user