[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: Bug#6801: konqy crash when quiting
From:       Simon Hausmann <shaus () helios ! Med ! Uni-Magdeburg ! DE>
Date:       2000-07-28 7:09:01
[Download RAW message or body]



On Thu, 27 Jul 2000, Richard Moore wrote:

> 
> 
> Simon Hausmann wrote:
> > 
> > On Thu, 27 Jul 2000, David Faure wrote:
> > 
> > > > AFAIK the popupmenu in KAction never has a parent qobject and doesn't get
> > > > re-parent'ed when inserting it into (multiple) parent menus. So I believe
> > > > that deleting it at the end should be fine.
> > > Ah ok, I thought I read recently that inserting a popupmenu
> > > into a parent popupmenu/menubar reparented it [that 'konsole has memory
> > > leaks' thread on kde-devel].
> > > Looks like I shouldn't trust what I read ;-)
> > 
> > Hehe ;-)
> > 
> > > > .. but apparently it isn't fine.. :(
> > > Nope :-}
> > >
> > > > Ahh! Perhaps it is because QMenuItem doesn't store the popupmenu as
> > > > QGuardedPtr but as QPopupMenu *popup_menu (in qmenudata.h) and therefore
> > > > doesn't "detect" when the item dies?
> > >
> > > Isn't that the usual "you should unplug the action before deleting it" rule ?
> > > Hmmm ! KSelectAction::plug insterts the menu, but there's no
> > > KSelectAction::unplug.
> > 
> > Doh! That's it, most likely!
> > 
> > Gosh, what a "simple" bug :-)
> 
> I asked about this the other week. The same thing applies to the recent
> files action. I wasn't sure if it was a problem as I'm not totally sure
> about how the actions work.

Hmmmm, I had another thought about this. The recent files action inherits
from list action which inherits from select action. Now the way
KSelectAction inserts menus/toolbar buttons should make it now problem for
the base implementation of unplug (KAction::unplug) to properly unplug the
items which KSelectAction::plug inserted, no? KAction::unplug calls, in
case of the menu items, just removeItem, which is transparent for normal
menu items or sub menus, or?

I get the feeling that the bug seems somewhere else...

Hmmmm, I'll see if I can find some free time to debug this.

Bye,
 Simon

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic