Actions in the context-menu

Milian Wolff mail at
Mon Feb 15 09:17:32 UTC 2010

Andreas Pakulat, 15.02.2010:
> On 15.02.10 02:41:00, Jonathan Schmidt-Dominé - Developer wrote:
> > Hi Kate and KDevelop devs!
> > 
> > What is the proper way to add an action to the context-menu from a
> > plugin? I simply used KTextEditor::View::contextMenu in the
> > KIcon-Inserter-Plugin. Now KDevelop seems to have a new context-menu and
> > it does not work in KDevelop. I used contextMenuAboutToShow to ensure
> > that it has been created, but it does not work, it will be replaced by
> > KDevelop.
> I hope that Milian can clarify this during the current KDevelop/Kate
> Sprint. Right now KDevelop clears the menu every time its requested (it
> connects to Kate's contextMenuAboutToShow signal) as otherwise the
> entries added by kdevelop are getting duplicated again and again.

Cristoph told me:

If it works with actions stored as member vars, we should use it.

The problem is: Most plugins use KXMLGUI to put in their context actions. That 
will probably get cleared when we use defaultContextMenu. But maybe we can use 
it as well - dunno, I hate this xml stuff it's totally incomprehensible for me.

Milian Wolff
mail at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the KDevelop-devel mailing list