Only show delete files option in setting with Qt >= 5.15

This commit is contained in:
Jonas Kvinge 2020-08-19 22:11:03 +02:00
parent 653a35496d
commit 47884919c8
2 changed files with 10 additions and 0 deletions

View File

@ -178,7 +178,12 @@ void CollectionSettingsPage::Load() {
ui_->spinbox_disk_cache_size->setValue(s.value(kSettingsDiskCacheSize, kSettingsDiskCacheSizeDefault).toInt());
ui_->combobox_disk_cache_size->setCurrentIndex(s.value(kSettingsDiskCacheSizeUnit, static_cast<int>(CacheSizeUnit_MB)).toInt());
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
ui_->checkbox_delete_files->setChecked(s.value("delete_files", false).toBool());
#else
ui_->checkbox_delete_files->setChecked(false);
ui_->checkbox_delete_files->hide();
#endif
s.endGroup();

View File

@ -83,7 +83,12 @@ void PlaylistSettingsPage::Load() {
ui_->checkbox_editmetadatainline->setChecked(s.value("editmetadatainline", false).toBool());
ui_->checkbox_writemetadata->setChecked(s.value(Playlist::kWriteMetadata, false).toBool());
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
ui_->checkbox_delete_files->setChecked(s.value("delete_files", false).toBool());
#else
ui_->checkbox_delete_files->setChecked(false);
ui_->checkbox_delete_files->hide();
#endif
s.endGroup();