[PATCH] Fix deref() in KMainWindow not being called

Thomas McGuire thomas.mcguire at gmx.net
Fri Aug 1 18:00:02 BST 2008


Hi,

currently KMail does not quit when the composer was open. This is because 
closing the composer doesn't call deref(), even though KMainWindow is supposed 
to do that for us.
The reason for that is that the composer overrides closeEvent(), which in 
KMainWindow is doing the deref() call.

Since the ref() call happens in the constructor, I changed the deref() call to 
happen in the destructor, to ensure it is always called.
Right now, overriding closeEvent() is a trap for application developers, this 
behavior is quite surprising.

I hope this patch doesn't have any side effects.

Any objections to committing this?

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deref.diff
Type: text/x-patch
Size: 1240 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080801/bb880521/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080801/bb880521/attachment.sig>


More information about the kde-core-devel mailing list