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

List:       kde-core-devel
Subject:    Re: KHelpMenu and QPopMenu pointer destruction
From:       Simon Hausmann <shaus () uermel ! Med ! Uni-Magdeburg ! DE>
Date:       1999-10-28 14:06:32
[Download RAW message or body]


Do I get you right that you have the problem of determining if the
popupmenu was already deleted, if the KHelpMenu destructor is run?

Then use a QGuardedPtr on the popupmenu!


Ciao,
 Simon

On Thu, 28 Oct 1999, Espen Sand wrote:

> The destruction procdeure in the KHelpMenu object is not really very good
> (see kdeui/khelpmenu.h for doc). The docs could have been better as well ;)
> 
> Can the ~KHelpMenu safely destroy the QPopMenu pointer when this pointer is 
> installed in KHelpMenu? The QPopMenu pointer does not have to be inserted
> into a KHelpMenu but perhaps be used as a toplevel menu in apps that have no
> menubar etc.
> 
> The reason why I ask is that the former KApplication::helpMenu() simply
> allocated a pointer but never destroyed it. I have seen some apps in the cvs
> that delete the help menu pointer on exit.
> 
> Personally I would like to get the QPopMenu destruction into the ~KHelpMenu 
> because this is the cleaner and easier to understand solution. Or should I
> simply not destroy the popmup menu pointer at all?
> 
> 
> 
> 
> -- 
> Espen Sand
> 
> 

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

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