Overwriting default menu entry locations (was: Re: KDE/kdelibs/kdeui/xmlgui)

Friedrich W. H. Kossebau kossebau at kde.org
Sun Jan 18 17:55:28 GMT 2009


Am Samstag, 17. Januar 2009, um 03:30 Uhr, schrieb David Faure:
> On Thursday 15 January 2009, Friedrich W. H. Kossebau wrote:
> > Am Mittwoch, 14. Januar 2009, um 23:59 Uhr, schrieb Friedrich W. H. 
Kossebau:
> > > Because the Go menu is part of base, not additive?
> >
> > Err, meant, Go is both in base and additive, so will have called
> > KXMLGUIClientPrivate::mergeXML() for it, then due to noMerge="1" being
> > replaced (by the empty one from additive).
> >
> > So for this error, however rare it might be, additive should be checked
> > if it isn't just perhaps an empty menu, so mergeXML() should instead
> > simply return false there.
>
> No it has to be checked in the same method call, i.e. the last loop has to
> run even for noMerge'd menus. Fix committed in trunk, r912265.

Thanks for fixing :)

> I'm not entirely confident about backporting it, so close to 4.2..... hmm,
> OTOH empty menus really look bad... can you all test your app's xmlgui with
> kdelibs trunk this weekend? If no regressions are found I'll backport on
> Monday.

I would say if you are unsure you could even wait until the tagging of 4.2.0. 
This error (empty menu) hasn't been triggered before, and to trigger it one 
must explicitely add a noMerge=1 menu with no or only unimplemented action 
ids. Nothing one would accidently do, or? :)

Will now report the example problem to the kate people, if they haven't been 
following here already.

Cheers
Friedrich
-- 
Okteta - KDE 4 Hex Editor - http://utils.kde.org/projects/okteta




More information about the kde-core-devel mailing list