X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/5c33e0211ff09f37adb5b48c59cf15b67c0059dc..4cbeb81b2b8e2d37c93cda4d88787e08e0658291:/src/kitemviews/kfileitemmodel.cpp diff --git a/src/kitemviews/kfileitemmodel.cpp b/src/kitemviews/kfileitemmodel.cpp index f42f2c193..77d5a319c 100644 --- a/src/kitemviews/kfileitemmodel.cpp +++ b/src/kitemviews/kfileitemmodel.cpp @@ -17,7 +17,6 @@ #include #include #include -#include #include #include @@ -982,7 +981,7 @@ void KFileItemModel::resortAllItems() // been moved because of the resorting. QList 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()); } @@ -1232,7 +1231,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); @@ -1650,7 +1649,7 @@ void KFileItemModel::prepareItemsForSorting(QList &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); } @@ -1659,7 +1658,7 @@ void KFileItemModel::prepareItemsForSorting(QList &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()) { @@ -2599,7 +2598,7 @@ QList> KFileItemModel::permissionRoleGroups() const if (info.permission(QFile::ExeUser)) { user += i18nc("@item:intext Access permission, concatenated", "Execute, "); } - user = user.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : user.mid(0, user.count() - 2); + user = user.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : user.mid(0, user.length() - 2); // Set group string QString group; @@ -2612,7 +2611,7 @@ QList> KFileItemModel::permissionRoleGroups() const if (info.permission(QFile::ExeGroup)) { group += i18nc("@item:intext Access permission, concatenated", "Execute, "); } - group = group.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : group.mid(0, group.count() - 2); + group = group.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : group.mid(0, group.length() - 2); // Set others string QString others; @@ -2625,7 +2624,7 @@ QList> KFileItemModel::permissionRoleGroups() const if (info.permission(QFile::ExeOther)) { others += i18nc("@item:intext Access permission, concatenated", "Execute, "); } - others = others.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : others.mid(0, others.count() - 2); + others = others.isEmpty() ? i18nc("@item:intext Access permission, concatenated", "Forbidden") : others.mid(0, others.length() - 2); const QString newGroupValue = i18nc("@title:group Files and folders by permissions", "User: %1 | Group: %2 | Others: %3", user, group, others); if (newGroupValue != groupValue) {