From aec687db2c141282d08dee6dfe76c1cdd87ea42a Mon Sep 17 00:00:00 2001 From: Crissman Loomis Date: Fri, 11 Sep 2026 10:06:18 -0400 Subject: [PATCH] Qt: use idClicked(); buttonClicked(int) is gone in Qt 6 Closes #1670 --- win/Qt/qt_plsel.cpp | 10 ++++++++++ win/Qt/qt_yndlg.cpp | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/win/Qt/qt_plsel.cpp b/win/Qt/qt_plsel.cpp index baaf49f6f..b646d347b 100644 --- a/win/Qt/qt_plsel.cpp +++ b/win/Qt/qt_plsel.cpp @@ -358,8 +358,13 @@ NetHackQtPlayerSelector::NetHackQtPlayerSelector( genderbox->layout()->addWidget(gender[i]); gendergroup->addButton(gender[i], i); } +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) + connect(gendergroup, SIGNAL(idClicked(int)), + this, SLOT(selectGender(int))); +#else connect(gendergroup, SIGNAL(buttonClicked(int)), this, SLOT(selectGender(int))); +#endif QLabel *alignlabel = new QLabel("Alignment"); alignbox->layout()->addWidget(alignlabel); @@ -369,8 +374,13 @@ NetHackQtPlayerSelector::NetHackQtPlayerSelector( alignbox->layout()->addWidget(alignment[i]); aligngroup->addButton(alignment[i], i); } +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) + connect(aligngroup, SIGNAL(idClicked(int)), + this, SLOT(selectAlignment(int))); +#else connect(aligngroup, SIGNAL(buttonClicked(int)), this, SLOT(selectAlignment(int))); +#endif l->addWidget(rand_btn, 4, 2); connect(rand_btn, SIGNAL(clicked()), this, SLOT(Randomize())); diff --git a/win/Qt/qt_yndlg.cpp b/win/Qt/qt_yndlg.cpp index 57e2f212f..a7dea6b68 100644 --- a/win/Qt/qt_yndlg.cpp +++ b/win/Qt/qt_yndlg.cpp @@ -292,7 +292,13 @@ char NetHackQtYnDialog::Exec() bgroup->addButton(button, i); } - connect(bgroup, SIGNAL(buttonClicked(int)), this, SLOT(doneItem(int))); +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) + connect(bgroup, SIGNAL(idClicked(int)), this, + SLOT(doneItem(int))); +#else + connect(bgroup, SIGNAL(buttonClicked(int)), this, + SLOT(doneItem(int))); +#endif QLabel *lb = 0; if (allow_count) {