Bug 420632 - App names in ExportMenu::getKServiceItems() are unsorted
Summary: App names in ExportMenu::getKServiceItems() are unsorted
Status: RESOLVED INTENTIONAL
Alias: None
Product: Spectacle
Classification: Applications
Component: General (other bugs)
Version First Reported In: 20.04.0
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: Boudhayan Gupta
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2020-04-26 19:00 UTC by Giovanni.Antonio.Carl.Friedrich
Modified: 2023-08-15 00:41 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni.Antonio.Carl.Friedrich 2020-04-26 19:00:01 UTC
SUMMARY
in ExportMenu::getKServiceItems() we get services unsorted

STEPS TO REPRODUCE
1. query KMimeTypeTrader
2. iterate over services
3. addAction(action);

OBSERVED RESULT
sometimes it's Gwenview + Gimp + Chromium + KolourPaint + qutebrowser
sometimes it's Gwenview + qutebrowser + Chromium + Gimp + KolourPaint

EXPECTED RESULT
from A to Z:
Chromium + Gimp + Gwenview + KolourPaint + qutebrowser

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.18.4.1
KDE Frameworks Version: 5.69.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
* std::tolower(service->name()) before sorting?
* for (auto service : sorted(services)) ?
Comment 1 Bug Janitor Service 2022-01-21 21:00:41 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/spectacle/-/merge_requests/120
Comment 2 Noah Davis 2023-08-14 20:10:59 UTC
They're actually sorted according to user preferences for the mimetype of the image file. If you have a PNG and you compare the app list in Spectacle to the app list for images/png in System Settings -> Applications -> File Associations, they're exactly the same.
Comment 3 Nate Graham 2023-08-15 00:41:43 UTC
Yeah, I agree that this should be declared intentional and the MR closed.