Qt/Settings: Add debug mode flag

This commit is contained in:
spycrab
2017-09-19 14:14:45 +02:00
parent 1df69c5750
commit ff283ff912
3 changed files with 21 additions and 1 deletions

View File

@ -196,3 +196,17 @@ void Settings::SetCheatsEnabled(bool enabled)
emit EnableCheatsChanged(enabled);
}
}
void Settings::SetDebugModeEnabled(bool enabled)
{
if (IsDebugModeEnabled() != enabled)
{
SConfig::GetInstance().bEnableDebugging = enabled;
emit DebugModeToggled(enabled);
}
}
bool Settings::IsDebugModeEnabled() const
{
return SConfig::GetInstance().bEnableDebugging;
}