KConfigDialog crash and fix for it

Joris Guisson joris.guisson at gmail.com
Mon Oct 22 18:27:26 BST 2007


Nobody interested ? I guess my patch must be fine then, shall I commit ?

Joris,

On 10/20/07, Joris Guisson <joris.guisson at gmail.com> wrote:
>
> Hi,
>
> I have noticed that there is a crash when you use KConfigDialog. When you
> add a page, then remove it again, and close the dialog with cancel (if your
> press OK, it doesn't crash).
>
> After some digging around in the code, I noticed there is this QMap
> managerForPage in KConfigDialog. Which gets iterated over when you press
> cancel. This map contains pointers to KConfigDialogManager objects (which
> are created per page), and those should be removed when a page is removed
> from the dialog, but this doesn't happen.
>
> KConfigDialogManager goes around checking a bunch of widgets which are
> part of a page and any properly coded program will delete those when it
> removes a page from a KConfigDialog. So in order to fix this crash you need
> clean up these KConfigDialogManager objects when the corresponding page is
> removed.
>
> The attached patch does this.
>
>
> Joris,
>
> Btw, if you want to reproduce the crash, compile and install ktorrent
> (trunk/extagear/network/ktorrent), load the webinterface plugin in the
> settings dialog, then unload it again, and close the dialog with cancel.
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071022/f4ae2834/attachment.htm>


More information about the kde-core-devel mailing list