diff --git a/src/apps/deskflow-gui/dialogs/ServerConfigDialog.cpp b/src/apps/deskflow-gui/dialogs/ServerConfigDialog.cpp index befe6a03f..359f58f8b 100644 --- a/src/apps/deskflow-gui/dialogs/ServerConfigDialog.cpp +++ b/src/apps/deskflow-gui/dialogs/ServerConfigDialog.cpp @@ -34,6 +34,8 @@ ServerConfigDialog::ServerConfigDialog(QWidget *parent, ServerConfig &config, Ap m_appConfig(appConfig) { ui->setupUi(this); + connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &ServerConfigDialog::accept); + connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &ServerConfigDialog::reject); ui->m_pButtonBrowseConfigFile->setIcon(QIcon::fromTheme(QIcon::ThemeIcon::DocumentOpen)); ui->m_pTrashScreenWidget->setPixmap(QIcon::fromTheme("user-trash").pixmap(QSize(64, 64))); @@ -475,6 +477,6 @@ void ServerConfigDialog::onChange() { bool isAppConfigDataEqual = m_OriginalServerConfigIsExternal == serverConfig().useExternalConfig() && m_OriginalServerConfigUsesExternalFile == serverConfig().configFile(); - ui->m_pButtonBox->button(QDialogButtonBox::Ok) + ui->buttonBox->button(QDialogButtonBox::Ok) ->setEnabled(!isAppConfigDataEqual || !(m_OriginalServerConfig == m_ServerConfig)); } diff --git a/src/apps/deskflow-gui/dialogs/ServerConfigDialog.ui b/src/apps/deskflow-gui/dialogs/ServerConfigDialog.ui index bad2e2b9e..b0d95f950 100644 --- a/src/apps/deskflow-gui/dialogs/ServerConfigDialog.ui +++ b/src/apps/deskflow-gui/dialogs/ServerConfigDialog.ui @@ -1133,7 +1133,7 @@ Enabling this setting will disable the server config GUI. - + Qt::Orientation::Horizontal @@ -1189,38 +1189,6 @@ Enabling this setting will disable the server config GUI. - - m_pButtonBox - accepted() - ServerConfigDialog - accept() - - - 572 - 424 - - - 377 - -8 - - - - - m_pButtonBox - rejected() - ServerConfigDialog - reject() - - - 641 - 424 - - - 595 - 1 - - - m_pCheckBoxSwitchDelay toggled(bool) @@ -1228,12 +1196,12 @@ Enabling this setting will disable the server config GUI. setEnabled(bool) - 110 - 63 + 76 + 88 - 110 - 63 + 86 + 88 @@ -1244,12 +1212,12 @@ Enabling this setting will disable the server config GUI. setEnabled(bool) - 110 - 63 + 76 + 81 - 110 - 63 + 86 + 81 @@ -1260,12 +1228,12 @@ Enabling this setting will disable the server config GUI. setEnabled(bool) - 110 - 63 + 32 + 91 - 110 - 63 + 44 + 91 @@ -1276,12 +1244,12 @@ Enabling this setting will disable the server config GUI. click() - 197 - 115 + 35 + 84 - 304 - 115 + 45 + 80 @@ -1292,12 +1260,12 @@ Enabling this setting will disable the server config GUI. click() - 505 - 120 + 79 + 84 - 677 - 118 + 89 + 80