| Summary: | Desktop actions are ordered based on name, not Action name | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | tomashnyk |
| Component: | general | Assignee: | KIO Bugs <kio-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | dolphin-bugs-null, kdelibs-bugs-null, meven29, meven |
| Priority: | NOR | Keywords: | regression |
| Version First Reported In: | 6.19.0 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/frameworks/kio/-/commit/fdb0546e6aa071c95392187cf300484d325156d9 | Version Fixed/Implemented In: | 6.20.0 |
| Sentry Crash Report: | |||
| Attachments: |
The file causing the issue
Bad ordering Good ordering |
||
|
Description
tomashnyk
2025-10-10 20:44:55 UTC
Created attachment 185676 [details]
Bad ordering
This is a screenshot of the original desktop file, I shortened it for the purposes of the bug report.
Created attachment 185677 [details]
Good ordering
This is a screenshot of the original desktop file, I shortened it for the purposes of the bug report.
Also not that when you right click the _.desktop_ file, the order is correct.
Code concerned is here https://invent.kde.org/frameworks/kio/-/blob/master/src/widgets/kfileitemactions.cpp?ref_type=heads#L196 And this is the bug that it arose from: https://bugs.kde.org/show_bug.cgi?id=466115 which reacted to https://invent.kde.org/frameworks/kio/-/commit/337853329c61c9cfe5e369acf65a8eca94e5e7fd ) which introduced sorting. I am not sure it is good design to sort alphabetically, or actually to sort in any way. I am not sure I understand or am convinced by the rationale given in the commit linked above. Menus in KDE are not sorted alphabetically at all, so why sort service menus? For my use case, sorting numbers inteligently would be good enough, but in general I would like to be able to set the order manually. I guess using https://doc.qt.io/qt-6/qcollator.html#details would do the job, the current implementation would also misorder Cad,Čad/Dad I think (should be sorted like that but Čad would come last, at least in Czech). A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/2025 Git commit fdb0546e6aa071c95392187cf300484d325156d9 by Méven Car, on behalf of Tomáš Hnyk. Committed on 21/10/2025 at 11:26. Pushed by meven into branch 'master'. kfileitems: Use internal name again for sorting Previously, KDesktopFileAction::name() was wrongly used to sort instead of KDesktopFileAction::actionsKey(). That meant service menus could not be ordered by their developers manually and weird situations like sorting actions named "Resize 300" after "Resize 2000". This regression was introduced when porting from KFileItemActinos to KDesktopFileAction in 0eb24754b5e3fb0025889bca1fca826f45961254 FIXED-IN: 6.20.0 M +1 -1 src/widgets/kfileitemactions.cpp https://invent.kde.org/frameworks/kio/-/commit/fdb0546e6aa071c95392187cf300484d325156d9 |