Add m_crashRecoveryDisabled to new settings API

This commit is contained in:
Vasily
2019-12-10 08:28:41 +01:00
committed by username223
parent adc3a1e7b2
commit bed0939ddf
4 changed files with 10 additions and 18 deletions
+5 -17
View File
@@ -298,12 +298,6 @@ OverlayController::OverlayController( bool desktopMode,
m_customTickRateMs = value.toInt();
}
}
value = appSettings()->value( "crashRecoveryDisabled",
m_crashRecoveryDisabled );
if ( value.isValid() && !value.isNull() )
{
m_crashRecoveryDisabled = value.toBool();
}
value = appSettings()->value( "enableDebug", m_enableDebug );
if ( value.isValid() && !value.isNull() )
{
@@ -735,23 +729,17 @@ void OverlayController::processInputBindings()
bool OverlayController::crashRecoveryDisabled() const
{
return m_crashRecoveryDisabled;
return settings::getSetting(
settings::BoolSetting::APPLICATION_crashRecoveryDisabled );
}
void OverlayController::setCrashRecoveryDisabled( bool value, bool notify )
{
if ( m_crashRecoveryDisabled == value )
{
return;
}
m_crashRecoveryDisabled = value;
appSettings()->beginGroup( "applicationSettings" );
appSettings()->setValue( "crashRecoveryDisabled", m_crashRecoveryDisabled );
appSettings()->endGroup();
appSettings()->sync();
settings::setSetting(
settings::BoolSetting::APPLICATION_crashRecoveryDisabled, value );
if ( notify )
{
emit crashRecoveryDisabledChanged( m_crashRecoveryDisabled );
emit crashRecoveryDisabledChanged( value );
}
}