Plugin causing duplicate entries in the document context menu

Friedrich W. H. Kossebau kossebau at kde.org
Mon Nov 12 14:28:45 GMT 2018


Am Montag, 12. November 2018, 14:22:04 CET schrieb René J.V. Bertin:
> On Monday November 12 2018 12:58:18 Kevin Funk wrote:
> > > Context menu generation is a little complicated so I haven't yet found a
> > > spot to put my finger on. It seems to have to do with the fact the
> > > plugin
> > > uses KXMLGui to manage it's menus(?).
> > 
> > Nope.
> 
> Are you sure? The issue disappears when I remove both the
> `actionCollection()->addAction(QLatin1String("popup_ctags"), m_menu);`
> expression from the KateCTagsView ctor AND the corresponding entry from the
> kxmlui ui.rc file.

I propose to not do experimental changes and to not treat the rest of the 
logic as blackbox to make assumptions about and then potentially confuse 
yourself and everyone with wrong ones, but to make use of the Open Source 
nature of kdevelop and your ability to patch things.

Go to KDevelop::TextDocument::populateContextMenu() and from there start to 
explore, either by debugger or qDebug logging, what is in the menu before and 
who adds what to the helper d->addedContextMenu one.

Cheers
Friedrich




More information about the KDevelop-devel mailing list