File fix-deprecated-stateChanged.patch of Package bambootracker
diff --git a/BambooTracker/gui/instrument_editor/fm_instrument_editor.cpp b/BambooTracker/gui/instrument_editor/fm_instrument_editor.cpp
index 37277c8..ff9cc10 100644
--- a/BambooTracker/gui/instrument_editor/fm_instrument_editor.cpp
+++ b/BambooTracker/gui/instrument_editor/fm_instrument_editor.cpp
@@ -277,7 +277,7 @@ FmInstrumentEditor::FmInstrumentEditor(int num, QWidget* parent) :
}
});
- QObject::connect(ui->amOp1CheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->amOp1CheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setLFOFMParameter(ui->lfoNumSpinBox->value(), FMLFOParameter::AM1,
@@ -286,7 +286,7 @@ FmInstrumentEditor::FmInstrumentEditor(int num, QWidget* parent) :
emit modified();
}
});
- QObject::connect(ui->amOp2CheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->amOp2CheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setLFOFMParameter(ui->lfoNumSpinBox->value(), FMLFOParameter::AM2,
@@ -295,7 +295,7 @@ FmInstrumentEditor::FmInstrumentEditor(int num, QWidget* parent) :
emit modified();
}
});
- QObject::connect(ui->amOp3CheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->amOp3CheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setLFOFMParameter(ui->lfoNumSpinBox->value(), FMLFOParameter::AM3,
@@ -304,7 +304,7 @@ FmInstrumentEditor::FmInstrumentEditor(int num, QWidget* parent) :
emit modified();
}
});
- QObject::connect(ui->amOp4CheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->amOp4CheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setLFOFMParameter(ui->lfoNumSpinBox->value(), FMLFOParameter::AM4,
@@ -685,35 +685,35 @@ FmInstrumentEditor::FmInstrumentEditor(int num, QWidget* parent) :
});
//========== Others ==========//
- QObject::connect(ui->envResetCheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->envResetCheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setInstrumentFMEnvelopeResetEnabled(instNum_, FMOperatorType::All, (state == Qt::Checked));
emit modified();
}
});
- QObject::connect(ui->envResetOp1CheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->envResetOp1CheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setInstrumentFMEnvelopeResetEnabled(instNum_, FMOperatorType::Op1, (state == Qt::Checked));
emit modified();
}
});
- QObject::connect(ui->envResetOp2CheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->envResetOp2CheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setInstrumentFMEnvelopeResetEnabled(instNum_, FMOperatorType::Op2, (state == Qt::Checked));
emit modified();
}
});
- QObject::connect(ui->envResetOp3CheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->envResetOp3CheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setInstrumentFMEnvelopeResetEnabled(instNum_, FMOperatorType::Op3, (state == Qt::Checked));
emit modified();
}
});
- QObject::connect(ui->envResetOp4CheckBox, &QCheckBox::stateChanged,
+ QObject::connect(ui->envResetOp4CheckBox, &QCheckBox::checkStateChanged,
this, [&](int state) {
if (!isIgnoreEvent_) {
bt_.lock()->setInstrumentFMEnvelopeResetEnabled(instNum_, FMOperatorType::Op4, (state == Qt::Checked));