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 );
}
}
-1
View File
@@ -121,7 +121,6 @@ private:
bool m_desktopMode;
bool m_noSound;
bool m_crashRecoveryDisabled = false;
bool m_enableDebug = false;
bool m_disableVersionCheck = false;
bool m_newVersionDetected = false;
+1
View File
@@ -26,6 +26,7 @@ enum class BoolSetting
APPLICATION_disableVersionCheck,
APPLICATION_previousShutdownSafe,
APPLICATION_vsyncDisabled,
APPLICATION_crashRecoveryDisabled,
VIDEO_brightnessEnabled,
VIDEO_isOverlayMethodActive,
+4
View File
@@ -231,6 +231,10 @@ private:
SettingCategory::Application,
QtInfo{ "vsyncDisabled" },
false },
BoolSettingValue{ BoolSetting::APPLICATION_crashRecoveryDisabled,
SettingCategory::Application,
QtInfo{ "crashRecoveryDisabled" },
false },
BoolSettingValue{ BoolSetting::VIDEO_brightnessEnabled,
SettingCategory::Video,