Kcontrol memory leak (patches included)

Albert Astals Cid astals11 at terra.es
Wed Jul 14 20:20:25 BST 2004


After recompilng all kdelibs and not just kdeui i got the menu entry and about 
dialog to show correctly but i now et a segmentation fault on changing the 
ported module to another one so let me rebuild everything with debug enabled 
and post another patch.

Albert

A Dimecres 14 Juliol 2004 20:17, Albert Astals Cid va escriure:
> Ok then i attach two patches.
>
> KCMdiff is a patch to kcmodule.cpp and .h to add the functions Frans
> suggested.
> artsKCMdiff is a patch to port arts kcontrol module to the new functions.
>
> I think they are fine, but for some strange reason i don't get the about
> option all i get in kcontrol Help is a disabled entry saying "About Current
> Module".
>
> Can someone please test the patches and tell me if they see the
> personalitzed about in arts module or they get "About Current Module" in
> grey ? (i think my kde stable version may be interfering)
>
> Albert.
>
> A Dimecres 14 Juliol 2004 12:54, Waldo Bastian va escriure:
> > On Wed July 14 2004 01:35, Albert Astals Cid wrote:
> > > Looking again at KCModule i see that
> > >
> > > /**
> > >    * This is generally only called for the KBugReport.
> > >    * Override and have it return a pointer to a constant.
> > >    *
> > >    * @note it is mandatory to implement this function.
> > >    *
> > >    * @returns the KAboutData for this module
> > >    */
> > >   virtual const KAboutData *aboutData() const { return 0; }
> > >
> > > it says you have to override it.
> > >
> > > To make the code you suggest work, the virtual should be removed
> >
> > No, it doesn't.
> >
> > > to ensure
> > > kcontrol modules make use of the setAboutData and KCModule's aboutData
> > > and not the redefined aboutData,
> >
> > If a module reimplements aboutData then it needs to take care of the
> > object itself, if he uses setAuboutData then the module shouldn't
> > reimplement aboutData and everything will be taken care of for him.
> >
> > > but the BC will be broken (if i undestand
> > > http://developer.kde.org/documentation/library/kdeqt/kde3arch/devel-bin
> > >ar yc ompatibility.html correctly) if the virtual is removed.
> >
> > Yes, so that's no option nor is it needed.
> >
> > Cheers,
> > Waldo




More information about the kde-core-devel mailing list