Add m_enableDebug to new settings API

This commit is contained in:
Vasily
2019-12-10 08:28:41 +01:00
committed by username223
parent bed0939ddf
commit c8b271ad3e
4 changed files with 10 additions and 17 deletions
+5 -16
View File
@@ -298,11 +298,6 @@ OverlayController::OverlayController( bool desktopMode,
m_customTickRateMs = value.toInt();
}
}
value = appSettings()->value( "enableDebug", m_enableDebug );
if ( value.isValid() && !value.isNull() )
{
m_enableDebug = value.toBool();
}
value
= appSettings()->value( "disableVersionCheck", m_disableVersionCheck );
if ( value.isValid() && !value.isNull() )
@@ -761,23 +756,17 @@ void OverlayController::setVsyncDisabled( bool value, bool notify )
bool OverlayController::enableDebug() const
{
return m_enableDebug;
return settings::getSetting(
settings::BoolSetting::APPLICATION_enableDebug );
}
void OverlayController::setEnableDebug( bool value, bool notify )
{
if ( m_enableDebug == value )
{
return;
}
m_enableDebug = value;
appSettings()->beginGroup( "applicationSettings" );
appSettings()->setValue( "enableDebug", m_enableDebug );
appSettings()->endGroup();
appSettings()->sync();
settings::setSetting( settings::BoolSetting::APPLICATION_enableDebug,
value );
if ( notify )
{
emit enableDebugChanged( m_enableDebug );
emit enableDebugChanged( value );
}
}
-1
View File
@@ -121,7 +121,6 @@ private:
bool m_desktopMode;
bool m_noSound;
bool m_enableDebug = false;
bool m_disableVersionCheck = false;
bool m_newVersionDetected = false;
int m_customTickRateMs = 20;
+1
View File
@@ -27,6 +27,7 @@ enum class BoolSetting
APPLICATION_previousShutdownSafe,
APPLICATION_vsyncDisabled,
APPLICATION_crashRecoveryDisabled,
APPLICATION_enableDebug,
VIDEO_brightnessEnabled,
VIDEO_isOverlayMethodActive,
+4
View File
@@ -235,6 +235,10 @@ private:
SettingCategory::Application,
QtInfo{ "crashRecoveryDisabled" },
false },
BoolSettingValue{ BoolSetting::APPLICATION_enableDebug,
SettingCategory::Application,
QtInfo{ "enableDebug" },
false },
BoolSettingValue{ BoolSetting::VIDEO_brightnessEnabled,
SettingCategory::Video,