Corrected description of applySortRole()

This commit is contained in:
Zakhar Afonin 2024-06-22 13:39:24 +03:00
parent 9167b30a35
commit f631747a0c
2 changed files with 2 additions and 1 deletions

View file

@ -1218,7 +1218,6 @@ void KFileItemModelRolesUpdater::applySortRole(int index)
QHash<QByteArray, QVariant> 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();

View file

@ -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);