From 47884919c8d98b794208f43d7afb390db2350b56 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Wed, 19 Aug 2020 22:11:03 +0200 Subject: [PATCH] Only show delete files option in setting with Qt >= 5.15 --- src/settings/collectionsettingspage.cpp | 5 +++++ src/settings/playlistsettingspage.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/settings/collectionsettingspage.cpp b/src/settings/collectionsettingspage.cpp index 5acb42557..f29439b6c 100644 --- a/src/settings/collectionsettingspage.cpp +++ b/src/settings/collectionsettingspage.cpp @@ -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(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(); diff --git a/src/settings/playlistsettingspage.cpp b/src/settings/playlistsettingspage.cpp index b0943bb8c..241e13db4 100644 --- a/src/settings/playlistsettingspage.cpp +++ b/src/settings/playlistsettingspage.cpp @@ -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();