Add m_enableDebug to new settings API
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -27,6 +27,7 @@ enum class BoolSetting
|
||||
APPLICATION_previousShutdownSafe,
|
||||
APPLICATION_vsyncDisabled,
|
||||
APPLICATION_crashRecoveryDisabled,
|
||||
APPLICATION_enableDebug,
|
||||
|
||||
VIDEO_brightnessEnabled,
|
||||
VIDEO_isOverlayMethodActive,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user