KToolBarPopupAction: Restore popupMenu()
Using menu() will make the action have a submenu when placed in a menu, which exactly counteracts the raison d'etre for this class.
Instead, the popupMenu() is to be used so that the menu only shows up in a toolbar but nowhere else as intended.
This is a breaking change, as menu()
will be null, so apps (like Dolphin) doing stuff like m_backAction->menu()->addAction()
will crash.
Not sure if we could warn about this at compile time
I was looking at adding recent documents to the “Open” action and found that it turned the action into a menu, even though I just wanted to have it as quick shortcut in a context/long-press menu on the toolbar.
Edited by Kai Uwe Broulik