Fix compile with Qt 5.14 and above
This commit is contained in:
parent
0e12c8249e
commit
8818f24114
|
@ -464,7 +464,7 @@ void CollectionView::ShowInVarious(bool on) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
for (const QString &album : QSet<QString>(albums.begin(), albums.end())) {
|
for (const QString &album : QSet<QString>(albums.keyBegin(), albums.keyEnd())) {
|
||||||
#else
|
#else
|
||||||
for (const QString &album : QSet<QString>::fromList(albums.keys())) {
|
for (const QString &album : QSet<QString>::fromList(albums.keys())) {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -88,7 +88,7 @@ void StandardItemIconLoader::RowsAboutToBeRemoved(const QModelIndex &parent, int
|
||||||
void StandardItemIconLoader::ModelReset() {
|
void StandardItemIconLoader::ModelReset() {
|
||||||
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
cover_loader_->CancelTasks(QSet<quint64>(pending_covers_.begin(), pending_covers_.end()));
|
cover_loader_->CancelTasks(QSet<quint64>(pending_covers_.keyBegin(), pending_covers_.keyEnd()));
|
||||||
#else
|
#else
|
||||||
cover_loader_->CancelTasks(QSet<quint64>::fromList(pending_covers_.keys()));
|
cover_loader_->CancelTasks(QSet<quint64>::fromList(pending_covers_.keys()));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -252,7 +252,7 @@ void AlbumCoverManager::closeEvent(QCloseEvent *e) {
|
||||||
void AlbumCoverManager::CancelRequests() {
|
void AlbumCoverManager::CancelRequests() {
|
||||||
|
|
||||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
|
||||||
app_->album_cover_loader()->CancelTasks(QSet<quint64>(cover_loading_tasks_.begin(), cover_loading_tasks_.end()));
|
app_->album_cover_loader()->CancelTasks(QSet<quint64>(cover_loading_tasks_.keyBegin(), cover_loading_tasks_.keyEnd()));
|
||||||
#else
|
#else
|
||||||
app_->album_cover_loader()->CancelTasks(QSet<quint64>::fromList(cover_loading_tasks_.keys()));
|
app_->album_cover_loader()->CancelTasks(QSet<quint64>::fromList(cover_loading_tasks_.keys()));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue