From: Zakhar Afonin Date: Sat, 22 Jun 2024 10:39:24 +0000 (+0300) Subject: Corrected description of applySortRole() X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/f631747a0cb04e47c677d344df06fa7011a16860 Corrected description of applySortRole() --- diff --git a/src/kitemviews/kfileitemmodelrolesupdater.cpp b/src/kitemviews/kfileitemmodelrolesupdater.cpp index 0012e99c1..3828f0979 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.cpp +++ b/src/kitemviews/kfileitemmodelrolesupdater.cpp @@ -1218,7 +1218,6 @@ void KFileItemModelRolesUpdater::applySortRole(int index) QHash data; const KFileItem item = m_model->fileItem(index); - // Despite the name, this handles both sorting and grouping, as they happen at the same time (resorting items). if (m_model->sortRole() == "type" || m_model->groupRole() == "type") { if (!item.isMimeTypeKnown()) { item.determineMimeType(); diff --git a/src/kitemviews/kfileitemmodelrolesupdater.h b/src/kitemviews/kfileitemmodelrolesupdater.h index aa9ca5fc0..df3a94226 100644 --- a/src/kitemviews/kfileitemmodelrolesupdater.h +++ b/src/kitemviews/kfileitemmodelrolesupdater.h @@ -315,6 +315,8 @@ private: /** * Resolves the sort role of the item and applies it to the model. + * Despite the name, this handles both sorting and grouping, as + * regrouping never happens without resorting at the same time. */ void applySortRole(int index);