From d9befb9e0a4898695eef5ccbc91a4fac02027854 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Fri, 30 Aug 2024 16:07:21 -0400 Subject: [PATCH] SettingsDialog: Fix Qt 6.7 checkbox signal deprecations qt/qtbase@3512fb1 deprecated the stateChanged signal of QCheckBoxes in favor of a new checkStateChanged signal. The signals are the same, except that now the enum type is passed explicitly (before the enum was passed as an argument but defined as an int). --- src/forms/SettingsDialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/forms/SettingsDialog.cpp b/src/forms/SettingsDialog.cpp index c59d5fb9..eaf2027e 100644 --- a/src/forms/SettingsDialog.cpp +++ b/src/forms/SettingsDialog.cpp @@ -56,8 +56,13 @@ SettingsDialog::SettingsDialog(QWidget *parent) connect(sessionTableTimer, &QTimer::timeout, this, &SettingsDialog::FillSessionTable); connect(ui->buttonBox, &QDialogButtonBox::clicked, this, &SettingsDialog::DialogButtonClicked); +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + connect(ui->enableAuthenticationCheckBox, &QCheckBox::checkStateChanged, this, + &SettingsDialog::EnableAuthenticationCheckBoxChanged); +#else connect(ui->enableAuthenticationCheckBox, &QCheckBox::stateChanged, this, &SettingsDialog::EnableAuthenticationCheckBoxChanged); +#endif connect(ui->generatePasswordButton, &QPushButton::clicked, this, &SettingsDialog::GeneratePasswordButtonClicked); connect(ui->showConnectInfoButton, &QPushButton::clicked, this, &SettingsDialog::ShowConnectInfoButtonClicked); connect(ui->serverPasswordLineEdit, &QLineEdit::textEdited, this, &SettingsDialog::PasswordEdited);