refactor(SettingDialog): update updateControls to include all controls

This commit is contained in:
sithlord48 2026-08-13 02:41:40 -04:00 committed by Nick Bolton
parent edf2dcbfb0
commit 584a74af61
2 changed files with 6 additions and 8 deletions

View file

@ -187,12 +187,6 @@ void SettingsDialog::setLogToFile(bool logToFile)
ui->widgetLogFilename->setEnabled(logToFile);
}
void SettingsDialog::showEvent(QShowEvent *event)
{
QDialog::showEvent(event);
Q_EMIT shown();
}
void SettingsDialog::resetAllSettings()
{
auto result = QMessageBox::question(
@ -378,8 +372,14 @@ void SettingsDialog::updateControls()
ui->comboInterface->setEnabled(writable);
ui->comboLogLevel->setEnabled(writable);
ui->groupLogToFile->setEnabled(writable);
ui->comboLanguage->setEnabled(writable);
ui->cbShowVersion->setEnabled(writable);
ui->cbGuiDebug->setEnabled(writable);
ui->rbIconColorful->setEnabled(writable);
ui->rbIconMono->setEnabled(writable);
ui->rbAutoHide->setEnabled(writable);
ui->rbShowOnStart->setEnabled(writable);
ui->btnClearAllSettings->setEnabled(writable);
ui->cbAutoUpdate->setEnabled(writable);
ui->cbPreventSleep->setEnabled(writable);
ui->lineTlsCertPath->setEnabled(writable);

View file

@ -27,7 +27,6 @@ public:
~SettingsDialog() override;
Q_SIGNALS:
void shown();
void requestRemoveAllSettings();
protected:
@ -40,7 +39,6 @@ private:
void browseLogPath();
void setLogToFile(bool logToFile);
void accept() override;
void showEvent(QShowEvent *event) override;
bool isClientMode() const;
void updateTlsControls();
void updateTlsControlsEnabled();