From e6f142e5e7563ebbcdc1bdf84c9ce87f11e01835 Mon Sep 17 00:00:00 2001 From: Eugene Popov Date: Wed, 20 Apr 2022 17:30:46 +0300 Subject: Add the ability to sort by file extension Currently, Dolphin doesn't have the ability to sort by file extension (sorting by type means that files will be sorted by mimetype but not by extension). This MR fixes this shortcoming. BUG: 429579 --- src/views/dolphinviewactionhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/views/dolphinviewactionhandler.cpp') diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index c02d7856b..1c5298703 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -664,7 +664,7 @@ void DolphinViewActionHandler::slotSortRoleChanged(const QByteArray& role) QAction* descending = m_actionCollection->action(QStringLiteral("descending")); QAction* ascending = m_actionCollection->action(QStringLiteral("ascending")); - if (role == "text" || role == "type" || role == "tags" || role == "comment") { + if (role == "text" || role == "type" || role == "extension" || role == "tags" || role == "comment") { descending->setText(i18nc("Sort descending", "Z-A")); ascending->setText(i18nc("Sort ascending", "A-Z")); } else if (role == "size") { -- cgit v1.3