SettingsDialog: Restart websocket server if debug mode changed

The functionality of not reloading the server when debug mode is
changed I determined was too confusing to use considering the
benefit that it provides by not reloading the websocket server.

It is technically possible to set debug mode to the server while
it is running, however the implementation would somewhat dirty the
UI code, so I do not feel comfortable doing it at this point.
This commit is contained in:
tt2468 2021-06-05 22:23:57 -07:00
parent f0c3bb2c14
commit 3d0ba91ff2

View File

@ -106,15 +106,11 @@ void SettingsDialog::SaveFormData()
}
bool needsRestart = false;
// I decided not to restart the server if debug is changed. Might mess with peoples' scripts
if (conf->ServerEnabled != ui->enableWebSocketServerCheckBox->isChecked()) {
needsRestart = true;
} else if (conf->AuthRequired != ui->enableAuthenticationCheckBox->isChecked()) {
needsRestart = true;
} else if (conf->ServerPassword != ui->serverPasswordLineEdit->text()) {
needsRestart = true;
} else if (conf->ServerPort != ui->serverPortSpinBox->value()) {
if ((conf->ServerEnabled != ui->enableWebSocketServerCheckBox->isChecked()) ||
(conf->DebugEnabled != ui->enableDebugLoggingCheckBox->isChecked()) ||
(conf->AuthRequired != ui->enableAuthenticationCheckBox->isChecked()) ||
(conf->ServerPassword != ui->serverPasswordLineEdit->text()) ||
(conf->ServerPort != ui->serverPortSpinBox->value()) {
needsRestart = true;
}