From 2d04e0be4d97aeb361cafa97d058c7aa70593a5d Mon Sep 17 00:00:00 2001 From: sithlord48 Date: Mon, 24 Feb 2025 19:28:21 -0500 Subject: [PATCH] refactor: SettingDialog do not connect from inside the ui file --- .../deskflow-gui/dialogs/SettingsDialog.cpp | 4 ++ .../deskflow-gui/dialogs/SettingsDialog.h | 1 + .../deskflow-gui/dialogs/SettingsDialog.ui | 37 +------------------ 3 files changed, 7 insertions(+), 35 deletions(-) diff --git a/src/apps/deskflow-gui/dialogs/SettingsDialog.cpp b/src/apps/deskflow-gui/dialogs/SettingsDialog.cpp index bbcec311d9..681c10ddb9 100644 --- a/src/apps/deskflow-gui/dialogs/SettingsDialog.cpp +++ b/src/apps/deskflow-gui/dialogs/SettingsDialog.cpp @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 Symless Ltd. * SPDX-FileCopyrightText: (C) 2008 Volker Lanz * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception @@ -35,6 +36,9 @@ SettingsDialog::SettingsDialog( ui->setupUi(this); + connect(ui->buttonBox, &QDialogButtonBox::accepted, this, &SettingsDialog::accept); + connect(ui->buttonBox, &QDialogButtonBox::rejected, this, &SettingsDialog::reject); + ui->m_pComboBoxTlsKeyLength->setItemIcon(0, QIcon::fromTheme(QIcon::ThemeIcon::SecurityLow)); ui->m_pComboBoxTlsKeyLength->setItemIcon(1, QIcon::fromTheme(QStringLiteral("security-medium"))); ui->m_pComboBoxTlsKeyLength->setItemIcon(2, QIcon::fromTheme(QIcon::ThemeIcon::SecurityHigh)); diff --git a/src/apps/deskflow-gui/dialogs/SettingsDialog.h b/src/apps/deskflow-gui/dialogs/SettingsDialog.h index a7874fd900..416e2bba11 100644 --- a/src/apps/deskflow-gui/dialogs/SettingsDialog.h +++ b/src/apps/deskflow-gui/dialogs/SettingsDialog.h @@ -1,5 +1,6 @@ /* * Deskflow -- mouse and keyboard sharing utility + * SPDX-FileCopyrightText: (C) 2025 Deskflow Developers * SPDX-FileCopyrightText: (C) 2012 Symless Ltd. * SPDX-FileCopyrightText: (C) 2008 Volker Lanz * SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception diff --git a/src/apps/deskflow-gui/dialogs/SettingsDialog.ui b/src/apps/deskflow-gui/dialogs/SettingsDialog.ui index 632e4d807c..c24a2b448c 100644 --- a/src/apps/deskflow-gui/dialogs/SettingsDialog.ui +++ b/src/apps/deskflow-gui/dialogs/SettingsDialog.ui @@ -711,7 +711,7 @@ - + Qt::Orientation::Horizontal @@ -739,38 +739,5 @@ m_pComboElevate - - - m_pButtonBox - accepted() - SettingsDialog - accept() - - - 266 - 340 - - - 157 - 274 - - - - - m_pButtonBox - rejected() - SettingsDialog - reject() - - - 334 - 340 - - - 286 - 274 - - - - +