Convert m_previousShutdownSafe to new settings API
This commit is contained in:
@@ -298,12 +298,6 @@ OverlayController::OverlayController( bool desktopMode,
|
|||||||
m_customTickRateMs = value.toInt();
|
m_customTickRateMs = value.toInt();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
value = appSettings()->value( "previousShutdownSafe",
|
|
||||||
m_previousShutdownSafe );
|
|
||||||
if ( value.isValid() && !value.isNull() )
|
|
||||||
{
|
|
||||||
m_previousShutdownSafe = value.toBool();
|
|
||||||
}
|
|
||||||
value = appSettings()->value( "crashRecoveryDisabled",
|
value = appSettings()->value( "crashRecoveryDisabled",
|
||||||
m_crashRecoveryDisabled );
|
m_crashRecoveryDisabled );
|
||||||
if ( value.isValid() && !value.isNull() )
|
if ( value.isValid() && !value.isNull() )
|
||||||
@@ -884,15 +878,8 @@ void OverlayController::setDebugState( int value, bool notify )
|
|||||||
|
|
||||||
void OverlayController::setPreviousShutdownSafe( bool value )
|
void OverlayController::setPreviousShutdownSafe( bool value )
|
||||||
{
|
{
|
||||||
if ( m_previousShutdownSafe == value )
|
settings::setSetting(
|
||||||
{
|
settings::BoolSetting::APPLICATION_previousShutdownSafe, value );
|
||||||
return;
|
|
||||||
}
|
|
||||||
m_previousShutdownSafe = value;
|
|
||||||
appSettings()->beginGroup( "applicationSettings" );
|
|
||||||
appSettings()->setValue( "previousShutdownSafe", m_previousShutdownSafe );
|
|
||||||
appSettings()->endGroup();
|
|
||||||
appSettings()->sync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int OverlayController::customTickRateMs() const
|
int OverlayController::customTickRateMs() const
|
||||||
@@ -1468,6 +1455,12 @@ void OverlayController::RotateCollisionBounds( float angle, bool commit )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool OverlayController::isPreviousShutdownSafe()
|
||||||
|
{
|
||||||
|
return settings::getSetting(
|
||||||
|
settings::BoolSetting::APPLICATION_previousShutdownSafe );
|
||||||
|
}
|
||||||
|
|
||||||
QString OverlayController::getVersionString()
|
QString OverlayController::getVersionString()
|
||||||
{
|
{
|
||||||
return QString( application_strings::applicationVersionString );
|
return QString( application_strings::applicationVersionString );
|
||||||
|
|||||||
@@ -120,7 +120,6 @@ private:
|
|||||||
Qt::MouseButtons m_lastMouseButtons = nullptr;
|
Qt::MouseButtons m_lastMouseButtons = nullptr;
|
||||||
|
|
||||||
bool m_desktopMode;
|
bool m_desktopMode;
|
||||||
bool m_previousShutdownSafe = true;
|
|
||||||
bool m_noSound;
|
bool m_noSound;
|
||||||
bool m_crashRecoveryDisabled = false;
|
bool m_crashRecoveryDisabled = false;
|
||||||
bool m_enableDebug = false;
|
bool m_enableDebug = false;
|
||||||
@@ -219,10 +218,7 @@ public:
|
|||||||
return m_desktopMode;
|
return m_desktopMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isPreviousShutdownSafe()
|
bool isPreviousShutdownSafe();
|
||||||
{
|
|
||||||
return m_previousShutdownSafe;
|
|
||||||
}
|
|
||||||
void setPreviousShutdownSafe( bool value );
|
void setPreviousShutdownSafe( bool value );
|
||||||
|
|
||||||
utils::ChaperoneUtils& chaperoneUtils() noexcept
|
utils::ChaperoneUtils& chaperoneUtils() noexcept
|
||||||
|
|||||||
Reference in New Issue
Block a user