From 5c001d3a32ef2f15db50da3d17b644d9d927c27a Mon Sep 17 00:00:00 2001 From: Ray Chason Date: Thu, 27 Oct 2022 21:51:10 -0400 Subject: [PATCH] Use idPressed signal for Qt 6 --- win/Qt/qt_svsel.cpp | 4 ++++ win/Qt/qt_xcmd.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/win/Qt/qt_svsel.cpp b/win/Qt/qt_svsel.cpp index 1ff94835a..191fb8887 100644 --- a/win/Qt/qt_svsel.cpp +++ b/win/Qt/qt_svsel.cpp @@ -99,7 +99,11 @@ QLayout: Attempting to add QLayout "" to QDialog "", which already has a layout QGroupBox *box = new QGroupBox("Saved Characters", this); QVBoxLayout *bgl = new QVBoxLayout(); QButtonGroup *bg = new QButtonGroup(); +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) + connect(bg, SIGNAL(idPressed(int)), this, SLOT(done(int))); +#else connect(bg, SIGNAL(buttonPressed(int)), this, SLOT(done(int))); +#endif for (int i = 0; saved[i]; ++i) { QPushButton *b = new QPushButton(saved[i]); bgl->addWidget(b); diff --git a/win/Qt/qt_xcmd.cpp b/win/Qt/qt_xcmd.cpp index 9fc71a15e..541fa1354 100644 --- a/win/Qt/qt_xcmd.cpp +++ b/win/Qt/qt_xcmd.cpp @@ -335,7 +335,11 @@ NetHackQtExtCmdRequestor::NetHackQtExtCmdRequestor(QWidget *parent) : } } +#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0) + connect(group, SIGNAL(idPressed(int)), this, SLOT(Button(int))); +#else connect(group, SIGNAL(buttonPressed(int)), this, SLOT(Button(int))); +#endif bl->activate(); xl->activate();