Use checkStateChanged(Qt::CheckState) with Qt >= 6.7
This commit is contained in:
@@ -172,7 +172,11 @@ EditTagDialog::EditTagDialog(Application *app, QWidget *parent)
|
||||
QObject::connect(spinbox, &SpinBox::Reset, this, &EditTagDialog::ResetField);
|
||||
}
|
||||
else if (CheckBox *checkbox = qobject_cast<CheckBox*>(widget)) {
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
QObject::connect(checkbox, &QCheckBox::checkStateChanged, this, &EditTagDialog::FieldValueEdited);
|
||||
#else
|
||||
QObject::connect(checkbox, &QCheckBox::stateChanged, this, &EditTagDialog::FieldValueEdited);
|
||||
#endif
|
||||
QObject::connect(checkbox, &CheckBox::Reset, this, &EditTagDialog::ResetField);
|
||||
}
|
||||
else if (RatingBox *ratingbox = qobject_cast<RatingBox*>(widget)) {
|
||||
|
||||
@@ -51,8 +51,13 @@ LastFMImportDialog::LastFMImportDialog(SharedPtr<LastFMImport> lastfm_import, QW
|
||||
QObject::connect(ui_->button_go, &QPushButton::clicked, this, &LastFMImportDialog::Start);
|
||||
QObject::connect(ui_->button_cancel, &QPushButton::clicked, this, &LastFMImportDialog::Cancel);
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0)
|
||||
QObject::connect(ui_->checkbox_last_played, &QCheckBox::checkStateChanged, this, &LastFMImportDialog::UpdateGoButtonState);
|
||||
QObject::connect(ui_->checkbox_playcounts, &QCheckBox::checkStateChanged, this, &LastFMImportDialog::UpdateGoButtonState);
|
||||
#else
|
||||
QObject::connect(ui_->checkbox_last_played, &QCheckBox::stateChanged, this, &LastFMImportDialog::UpdateGoButtonState);
|
||||
QObject::connect(ui_->checkbox_playcounts, &QCheckBox::stateChanged, this, &LastFMImportDialog::UpdateGoButtonState);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user