refactor: Remove option to disable autologoff

Auto logoff was always enabled in normal builds anyway, even when the
user tried to disable it (see 8eff8cd).
This commit is contained in:
Lars Toenning
2024-01-27 22:16:42 +01:00
parent 882ae3b741
commit 298c9eeec1
14 changed files with 0 additions and 120 deletions

View File

@@ -85,13 +85,6 @@ namespace BlackGui::Components
// override details/voice
ui->comp_NetworkDetails->setAlwaysAllowOverride(true);
// auto logoff
// we decided to make it difficult for users to disable it
if (!CBuildConfig::isLocalDeveloperDebugBuild())
{
ui->cb_AutoLogoff->setChecked(true);
}
// Stored data
this->loadRememberedUserData();
@@ -105,17 +98,11 @@ namespace BlackGui::Components
// inital setup, if data already available
ui->form_Pilot->validate();
ui->cb_AutoLogoff->setChecked(m_networkSetup.useAutoLogoff());
}
CLoginAdvComponent::~CLoginAdvComponent()
{}
void CLoginAdvComponent::setAutoLogoff(bool autoLogoff)
{
ui->cb_AutoLogoff->setChecked(autoLogoff);
}
void CLoginAdvComponent::loginCancelled()
{
this->closeOverlay();
@@ -129,7 +116,6 @@ namespace BlackGui::Components
const bool isConnected = sGui && sGui->getIContextNetwork()->isConnected();
const bool vatsimLogin = ui->comp_NetworkDetails->isVatsimServerSelected();
m_networkSetup.setAutoLogoff(ui->cb_AutoLogoff->isChecked());
ui->form_Pilot->setVatsimValidation(vatsimLogin);
@@ -323,7 +309,6 @@ namespace BlackGui::Components
void CLoginAdvComponent::autoLogoffDetection()
{
if (!ui->cb_AutoLogoff->isChecked()) { return; }
if (!this->hasValidContexts()) { return; }
if (!sGui->getIContextNetwork()->isConnected()) { return; } // nothing to logoff
@@ -337,7 +322,6 @@ namespace BlackGui::Components
void CLoginAdvComponent::autoLogoffFrameRate(bool fatal)
{
//! \fixme code duplication with function above
if (!ui->cb_AutoLogoff->isChecked()) { return; }
if (!this->hasValidContexts()) { return; }
if (!sGui->getIContextNetwork()->isConnected()) { return; }