[PATCH] KAction (Was: [Bug 50342] konsole crash when quitting)
Waldo Bastian
bastian at kde.org
Wed Nov 27 17:59:45 GMT 2002
The following patch fixes the problem for me. It is not really clear to me why
the sequence of events in the bugreport trigger this bug, Maybe there is
something else wrong as well?
Short description:
m_parentCollection is a normal pointer to a KActionCollection and does not
become null when the KActionCollect gets deleted. However, the QObject
destructor, called as part of the KActionCollection destructor, deletes
all child objects (among them KAction objects) and resets parent() before
deleting them. So if parent() is null, the KAction object is being deleted
as part of the m_parentCollection destructor and m_parentCollection shouldn't
be any longer used.
Hmm.. what do we have here.... I guess this means there is something else
wrong as well, because there is code in ~KActionCollection that resets
pAction->m_parentCollection and that fails to work for some reason.
Cheers,
Waldo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kaction.diff
Type: text/x-diff
Size: 595 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20021127/fe9a082c/attachment.diff>
More information about the kde-core-devel
mailing list