diff options
| author | Méven Car <[email protected]> | 2023-09-10 15:19:13 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-09-10 15:19:13 +0200 |
| commit | b58a346be96f7d0973ed96e52c4cf95463ba244d (patch) | |
| tree | 799775ba70d0d9f61f2d400ad1b46227979dec26 /src/kitemviews/kfileitemmodel.cpp | |
| parent | 5a7b749f5b524f771c549774de4783f014664135 (diff) | |
Replace qAsConst with std::as_const
Diffstat (limited to 'src/kitemviews/kfileitemmodel.cpp')
| -rw-r--r-- | src/kitemviews/kfileitemmodel.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index b71a4325b..a175e0bfe 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -981,7 +981,7 @@ void KFileItemModel::resortAllItems() // been moved because of the resorting. QList<QUrl> oldUrls; oldUrls.reserve(itemCount); - for (const ItemData *itemData : qAsConst(m_itemData)) { + for (const ItemData *itemData : std::as_const(m_itemData)) { oldUrls.append(itemData->item.url()); } @@ -1226,7 +1226,7 @@ void KFileItemModel::slotItemsDeleted(const KFileItemList &items) indexesToRemoveWithChildren.reserve(m_itemData.count()); const int itemCount = m_itemData.count(); - for (int index : qAsConst(indexesToRemove)) { + for (int index : std::as_const(indexesToRemove)) { indexesToRemoveWithChildren.append(index); const int parentLevel = expandedParentsCount(index); @@ -1644,7 +1644,7 @@ void KFileItemModel::prepareItemsForSorting(QList<ItemData *> &itemDataList) case DeletionTimeRole: // These roles can be determined with retrieveData, and they have to be stored // in the QHash "values" for the sorting. - for (ItemData *itemData : qAsConst(itemDataList)) { + for (ItemData *itemData : std::as_const(itemDataList)) { if (itemData->values.isEmpty()) { itemData->values = retrieveData(itemData->item, itemData->parent); } @@ -1653,7 +1653,7 @@ void KFileItemModel::prepareItemsForSorting(QList<ItemData *> &itemDataList) case TypeRole: // At least store the data including the file type for items with known MIME type. - for (ItemData *itemData : qAsConst(itemDataList)) { + for (ItemData *itemData : std::as_const(itemDataList)) { if (itemData->values.isEmpty()) { const KFileItem item = itemData->item; if (item.isDir() || item.isMimeTypeKnown()) { |
