diff --git a/src/covermanager/albumcoverexport.cpp b/src/covermanager/albumcoverexport.cpp index dcbd31558..5b45f6b2c 100644 --- a/src/covermanager/albumcoverexport.cpp +++ b/src/covermanager/albumcoverexport.cpp @@ -41,7 +41,11 @@ AlbumCoverExport::AlbumCoverExport(QWidget *parent) : QDialog(parent), ui_(new U ui_->setupUi(this); +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + QObject::connect(ui_->forceSize, &QCheckBox::checkStateChanged, this, &AlbumCoverExport::ForceSizeToggled); +#else QObject::connect(ui_->forceSize, &QCheckBox::stateChanged, this, &AlbumCoverExport::ForceSizeToggled); +#endif } @@ -99,7 +103,11 @@ AlbumCoverExport::DialogResult AlbumCoverExport::Exec() { } +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +void AlbumCoverExport::ForceSizeToggled(Qt::CheckState state) { +#else void AlbumCoverExport::ForceSizeToggled(int state) { +#endif ui_->width->setEnabled(state == Qt::Checked); ui_->height->setEnabled(state == Qt::Checked); } diff --git a/src/covermanager/albumcoverexport.h b/src/covermanager/albumcoverexport.h index b5ef1139a..28712ad56 100644 --- a/src/covermanager/albumcoverexport.h +++ b/src/covermanager/albumcoverexport.h @@ -70,7 +70,11 @@ class AlbumCoverExport : public QDialog { DialogResult Exec(); private slots: +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + void ForceSizeToggled(Qt::CheckState state); +#else void ForceSizeToggled(int state); +#endif private: Ui_AlbumCoverExport *ui_; diff --git a/src/dialogs/edittagdialog.cpp b/src/dialogs/edittagdialog.cpp index 16c2039a2..d86941bc3 100644 --- a/src/dialogs/edittagdialog.cpp +++ b/src/dialogs/edittagdialog.cpp @@ -172,7 +172,11 @@ EditTagDialog::EditTagDialog(Application *app, QWidget *parent) QObject::connect(spinbox, &SpinBox::Reset, this, &EditTagDialog::ResetField); } else if (CheckBox *checkbox = qobject_cast(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(widget)) { diff --git a/src/dialogs/lastfmimportdialog.cpp b/src/dialogs/lastfmimportdialog.cpp index f452c1d61..e17336083 100644 --- a/src/dialogs/lastfmimportdialog.cpp +++ b/src/dialogs/lastfmimportdialog.cpp @@ -51,8 +51,13 @@ LastFMImportDialog::LastFMImportDialog(SharedPtr 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 } diff --git a/src/settings/collectionsettingspage.cpp b/src/settings/collectionsettingspage.cpp index 40b647f8a..165a6efcb 100644 --- a/src/settings/collectionsettingspage.cpp +++ b/src/settings/collectionsettingspage.cpp @@ -97,7 +97,11 @@ CollectionSettingsPage::CollectionSettingsPage(SettingsDialog *dialog, QWidget * QObject::connect(ui_->song_tracking, &QCheckBox::toggled, this, &CollectionSettingsPage::SongTrackingToggled); #endif +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + QObject::connect(ui_->checkbox_disk_cache, &QCheckBox::checkStateChanged, this, &CollectionSettingsPage::DiskCacheEnable); +#else QObject::connect(ui_->checkbox_disk_cache, &QCheckBox::stateChanged, this, &CollectionSettingsPage::DiskCacheEnable); +#endif QObject::connect(ui_->button_clear_disk_cache, &QPushButton::clicked, dialog->app(), &Application::ClearPixmapDiskCache); QObject::connect(ui_->button_clear_disk_cache, &QPushButton::clicked, this, &CollectionSettingsPage::ClearPixmapDiskCache); @@ -276,9 +280,13 @@ void CollectionSettingsPage::SongTrackingToggled() { } +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) +void CollectionSettingsPage::DiskCacheEnable(const Qt::CheckState state) { +#else void CollectionSettingsPage::DiskCacheEnable(const int state) { +#endif - bool checked = state == Qt::Checked; + const bool checked = state == Qt::Checked; ui_->label_disk_cache_size->setEnabled(checked); ui_->spinbox_disk_cache_size->setEnabled(checked); ui_->combobox_disk_cache_size->setEnabled(checked); diff --git a/src/settings/collectionsettingspage.h b/src/settings/collectionsettingspage.h index 3bcd159ff..b0fb98baf 100644 --- a/src/settings/collectionsettingspage.h +++ b/src/settings/collectionsettingspage.h @@ -71,7 +71,11 @@ class CollectionSettingsPage : public SettingsPage { void CurrentRowChanged(const QModelIndex &idx); void SongTrackingToggled(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 7, 0) + void DiskCacheEnable(const Qt::CheckState state); +#else void DiskCacheEnable(const int state); +#endif void ClearPixmapDiskCache(); void CacheSizeUnitChanged(int index); void DiskCacheSizeUnitChanged(int index);