Replace qAsConst with C++17 std::as_const

This commit is contained in:
Jonas Kvinge
2021-08-22 23:26:53 +02:00
parent c076933b52
commit 72d381e9ed
7 changed files with 17 additions and 13 deletions

View File

@@ -278,7 +278,7 @@ void MoodbarItemDelegate::ImageLoaded(const QUrl &url, const QImage &image) {
const QSortFilterProxyModel *filter = playlist->proxy();
// Update all the indices with the new pixmap.
for (const QPersistentModelIndex &idx : qAsConst(data->indexes_)) {
for (const QPersistentModelIndex &idx : std::as_const(data->indexes_)) {
if (idx.isValid() && idx.sibling(idx.row(), Playlist::Column_Filename).data().toUrl() == url) {
QModelIndex source_index = idx;
if (idx.model() == filter) {