From 8818f241146e187732d3dbce1dc41e3ebfba87c6 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Mon, 30 Dec 2019 02:28:54 +0100 Subject: [PATCH] Fix compile with Qt 5.14 and above --- src/collection/collectionview.cpp | 2 +- src/core/standarditemiconloader.cpp | 2 +- src/covermanager/albumcovermanager.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/collection/collectionview.cpp b/src/collection/collectionview.cpp index 72dd1391b..c6e998fb9 100644 --- a/src/collection/collectionview.cpp +++ b/src/collection/collectionview.cpp @@ -464,7 +464,7 @@ void CollectionView::ShowInVarious(bool on) { } #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) - for (const QString &album : QSet(albums.begin(), albums.end())) { + for (const QString &album : QSet(albums.keyBegin(), albums.keyEnd())) { #else for (const QString &album : QSet::fromList(albums.keys())) { #endif diff --git a/src/core/standarditemiconloader.cpp b/src/core/standarditemiconloader.cpp index 66a08ec8b..88cabf93b 100644 --- a/src/core/standarditemiconloader.cpp +++ b/src/core/standarditemiconloader.cpp @@ -88,7 +88,7 @@ void StandardItemIconLoader::RowsAboutToBeRemoved(const QModelIndex &parent, int void StandardItemIconLoader::ModelReset() { #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) - cover_loader_->CancelTasks(QSet(pending_covers_.begin(), pending_covers_.end())); + cover_loader_->CancelTasks(QSet(pending_covers_.keyBegin(), pending_covers_.keyEnd())); #else cover_loader_->CancelTasks(QSet::fromList(pending_covers_.keys())); #endif diff --git a/src/covermanager/albumcovermanager.cpp b/src/covermanager/albumcovermanager.cpp index 85b62ee2b..a328b2a4a 100644 --- a/src/covermanager/albumcovermanager.cpp +++ b/src/covermanager/albumcovermanager.cpp @@ -252,7 +252,7 @@ void AlbumCoverManager::closeEvent(QCloseEvent *e) { void AlbumCoverManager::CancelRequests() { #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) - app_->album_cover_loader()->CancelTasks(QSet(cover_loading_tasks_.begin(), cover_loading_tasks_.end())); + app_->album_cover_loader()->CancelTasks(QSet(cover_loading_tasks_.keyBegin(), cover_loading_tasks_.keyEnd())); #else app_->album_cover_loader()->CancelTasks(QSet::fromList(cover_loading_tasks_.keys())); #endif