UI: Fix Qt 6.7 checkbox signal deprecations

qt/qtbase@3512fb1ec5 deprecated the
stateChanged signal of QCheckBoxes in favor of a new checkStateChanged
signal. The signals are the same, except that now the enum type is
passed explicitly (before the enum was passed as an argument but defined
as an int).
This commit is contained in:
gxalpha
2024-05-26 01:19:36 +02:00
committed by Ryan Foster
parent 51fd7fbaff
commit 9eca7b7525
5 changed files with 38 additions and 4 deletions

View File

@@ -71,9 +71,13 @@ OBSBasicTransform::OBSBasicTransform(OBSSceneItem item, OBSBasic *parent)
&OBSBasicTransform::OnCropChanged);
HookWidget(ui->cropBottom, ISCROLL_CHANGED,
&OBSBasicTransform::OnCropChanged);
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
HookWidget(ui->cropToBounds, &QCheckBox::checkStateChanged,
&OBSBasicTransform::OnControlChanged);
#else
HookWidget(ui->cropToBounds, &QCheckBox::stateChanged,
&OBSBasicTransform::OnControlChanged);
#endif
ui->buttonBox->button(QDialogButtonBox::Close)->setDefault(true);
connect(ui->buttonBox->button(QDialogButtonBox::Reset),