From 1dbf6035ff4e66273c5e1fbf6358f427f6a93e27 Mon Sep 17 00:00:00 2001 From: Filippo Gentile Date: Sun, 2 Mar 2025 13:26:27 +0100 Subject: [PATCH] ConnectDialog: use QCheckBox::checkStateChanged() from Qt 6.7 --- client/src/dialog/connectdialog.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/dialog/connectdialog.cpp b/client/src/dialog/connectdialog.cpp index bf3d15f8..1aee68a6 100644 --- a/client/src/dialog/connectdialog.cpp +++ b/client/src/dialog/connectdialog.cpp @@ -56,8 +56,14 @@ ConnectDialog::ConnectDialog(QWidget* parent, const QString& url) : m_password->setEchoMode(QLineEdit::Password); m_connectAutomatically->setChecked(GeneralSettings::instance().connectAutomaticallyToDiscoveredServer.value()); + + #if QT_VERSION < QT_VERSION_CHECK(6, 7, 0) connect(m_connectAutomatically, &QCheckBox::stateChanged, this, [](int state) + #else + connect(m_connectAutomatically, &QCheckBox::checkStateChanged, this, + [](Qt::CheckState state) + #endif { GeneralSettings::instance().connectAutomaticallyToDiscoveredServer.setValue(state == Qt::Checked); });