Kcontrol memory leak (patches included)
Albert Astals Cid
astals11 at terra.es
Wed Jul 14 19:17:23 BST 2004
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-binar
> >yc ompatibility.html correctly) if the virtual is removed.
>
> Yes, so that's no option nor is it needed.
>
> Cheers,
> Waldo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KCMdiff
Type: text/x-diff
Size: 2123 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040714/775d3ee6/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: artsKCMdiff
Type: text/x-diff
Size: 1747 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20040714/775d3ee6/attachment-0001.diff>
More information about the kde-core-devel
mailing list