Add backwards support Qt6.7's checkStateChanged on QCheckBoxes (#5137)

This commit is contained in:
Zach H 2024-10-20 23:35:34 -04:00 committed by GitHub
parent b041f4ace2
commit 8d5421d9da
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 251 additions and 176 deletions

View file

@ -81,7 +81,8 @@ void DlgCreateGame::sharedCtor()
spectatorsAllowedCheckBox = new QCheckBox(tr("&Spectators can watch"));
spectatorsAllowedCheckBox->setChecked(true);
connect(spectatorsAllowedCheckBox, SIGNAL(stateChanged(int)), this, SLOT(spectatorsAllowedChanged(int)));
connect(spectatorsAllowedCheckBox, SIGNAL(QT_STATE_CHANGED(QT_STATE_CHANGED_T)), this,
SLOT(spectatorsAllowedChanged(QT_STATE_CHANGED_T)));
spectatorsNeedPasswordCheckBox = new QCheckBox(tr("Spectators &need a password to watch"));
spectatorsCanTalkCheckBox = new QCheckBox(tr("Spectators can &chat"));
spectatorsSeeEverythingCheckBox = new QCheckBox(tr("Spectators can see &hands"));
@ -277,7 +278,7 @@ void DlgCreateGame::checkResponse(const Response &response)
}
}
void DlgCreateGame::spectatorsAllowedChanged(int state)
void DlgCreateGame::spectatorsAllowedChanged(QT_STATE_CHANGED_T state)
{
spectatorsNeedPasswordCheckBox->setEnabled(state);
spectatorsCanTalkCheckBox->setEnabled(state);