Fixed the issue with jump back actions not closing bookmark menu when triggered

Authored by nmel on Mar 26 2018, 6:59 AM.



As discussed in D11624, I'm fixing the issue with not closing bookmark menu.

Test Plan

Test jump back actions in bookmark menu triggered by mouse, keyboard, search.

Diff Detail

R167 Krusader
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
nmel requested review of this revision.Mar 26 2018, 6:59 AM
nmel created this revision.
nmel added reviewers: martinkostolny, rade.
martinkostolny accepted this revision.Mar 26 2018, 9:20 PM

Works nice, thanks!

Please see my code comment.


There is a possibility to use a UniqueConnection instead of disconnect & connect. But we would need to create a standard method for closing the popup (named e.g. KrBookmarkHandler::slotCloseBookmarkPopup) instead of slotTriggered lambda. Maybe it could also be then re-used in KrBookmarkHandler::slotActivated. Then we could just call here this:

connect(action, &QAction::triggered, this, &KrBookmarkHandler::slotCloseBookmarkPopup, Qt::UniqueConnection);

But it's just a suggestion.

This revision is now accepted and ready to land.Mar 26 2018, 9:20 PM
nmel added a comment.Mar 27 2018, 5:30 AM

Thanks for review and testing!


It's a great suggestion. I think I'll do this as a part of CONNECT_BM refactoring later.

This revision was automatically updated to reflect the committed changes.