Feature #1078
openAdd context menus to the bookmarks menu
0%
Description
Currently the context menus only work on the bookmarks toolbar.
Konqueror has them working on both (except that they killed the context menu on items in the bookmark menu that aren't bookmarks).
Using setContextMenuPolicy(Qt::CustomContextMenu)
doesn't work because it is overwritten by void KMenuMenuHandler::showContextMenu(QMenu *menu, const QPoint &pos)
in kmenumenuhandler_p.cpp
.
https://github.com/KDE/kxmlgui/blob/master/src/kmenumenuhandler_p.cpp
Konqueror may be able to work around this because they don't base their system directly on KXmlGuiWindow
, but rather `KParts::MainWindow` and `KonqFrameContainerBase`.
They do this with QMenu *KonqBookmarkMenu::contextMenu(QAction *action)
in kbookmarkmenu.cpp
, which overrides the protected function in KBookmarkMenu
.
https://api.kde.org/frameworks/kbookmarks/html/kbookmarkmenu_8cpp_source.html