even if the menu has already been created, cause setapplicationActions
to add actions in the drop menu.
Details
- Reviewers
dfaure - Group Reviewers
Plasma - Commits
- R241:c1bbe00181b0: allow to add application actions on an open menu
twsted on plasma drop menu, menu opens and in a second time gets the extra actions
Diff Detail
- Repository
- R241 KIO
- Branch
- phab/setActionsLater
- Lint
No Linters Available - Unit
No Unit Test Coverage
Much nicer than the other approach, just one question.
src/widgets/dropjob.cpp | ||
---|---|---|
324 | Should this be && instead of ||? "Add actions if either of those is not empty" seems weird, what's the reasoning? |
src/widgets/dropjob.cpp | ||
---|---|---|
324 | It's a copy of the if() on line 311. But there it makes sense. Here not so much ;) What if there were already some plugin actions? Then instead of the usual And what if there were already some app actions? Then it's even worse, we end up with It sounds to me like
XMLGUI would handle all this automatically pretty well ;) |
src/widgets/dropjob.cpp | ||
---|---|---|
330 | Don't worry too much about that, QMenu automatically suppresses doubled separators or separators at begin/end of the menu. | |
332 | If you do keep it, maybe add a check that menu->actions() isn't empty, otherwise last() will assert. |