Project

General

Profile

Actions

Feature #1078

open

Add context menus to the bookmarks menu

Added by Soren Stoutner about 1 year ago. Updated 9 months ago.

Status:
New
Priority:
1.x
Start date:
09/07/2023
Due date:
% Done:

0%

Estimated time:

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

Actions

Also available in: Atom PDF