Qt: use idClicked(); buttonClicked(int) is gone in Qt 6

Closes #1670
This commit is contained in:
Crissman Loomis
2026-09-11 10:06:18 -04:00
committed by nhmall
parent 55769ca9f0
commit aec687db2c
2 changed files with 17 additions and 1 deletions
+10
View File
@@ -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()));
+7 -1
View File
@@ -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) {