Bug 423765

Summary: Improve KFileItemAction action menu placement
Product: [Frameworks and Libraries] frameworks-kio Reporter: tcanabrava
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description tcanabrava 2020-07-01 19:42:17 UTC
SUMMARY
KFileItemActions only adds actions to the end of the menu
It should be possible to specify the index, or the *before, just like QMenu does.
Right now I'm adding to the menu, removing, and re-adding to the menu in the correct place for konsole
Comment 1 Bug Janitor Service 2020-12-02 20:50:35 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/240
Comment 2 Ahmad Samir 2020-12-09 14:30:36 UTC
Git commit 1534dd1391f947f37c0cadc30b875b62425063c8 by Ahmad Samir.
Committed on 09/12/2020 at 14:19.
Pushed by ahmadsamir into branch 'master'.

KFileItemActions: add new method to insert openwith actions

This adds a new method, insertOpenWithActionsTo(), that will insert the
openWith actions before a specific action; if that action is nullptr or
isn't available in the topMenu, the openWith actions will be appended.

M  +35   -41   src/widgets/kfileitemactions.cpp
M  +24   -2    src/widgets/kfileitemactions.h

https://invent.kde.org/frameworks/kio/commit/1534dd1391f947f37c0cadc30b875b62425063c8