[Kde-pim] Extracting some code from KMail into a lib

Kevin Krammer kevin.krammer at gmx.at
Sat Sep 25 11:54:18 BST 2010


On Saturday, 2010-09-25, Andras Mantia wrote:
> Ingo Klöcker wrote:
> > I agree with Thomas that it should be a proper singleton if it is a
> > singleton. I don't see the problem with two singletons if in the desktop
> > version MailCommon is just an interface to KMKernel.
> 
> Thanks for the opinion and your interface based solution. Meantime I
> chatted about this with Till as well, and decided to go on with the
> singleton solution (now either yours, or a singleton in the lib and
> KMKernel derives from it). Just that by following the refactoring in small
> steps, right now the lib has the MailCommon passing around, but I will
> change it next week to use a singleton there.

One important thing to consider when doing singletons is to never make a 
QObject singleton unless you are 110% sure it is never going to be used in a 
thread.

Cheers,
Kevin

-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100925/c0b30d8f/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list