[Kde-pim] Extracting some code from KMail into a lib
Ingo Klöcker
kloecker at kde.org
Sat Sep 25 15:13:14 BST 2010
On Saturday 25 September 2010, Kevin Krammer wrote:
> 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.
Hmm. What's problematic about a QObject-derived singleton (apart from
QObject's methods probably not being thread-safe and/or re-entrant)?
Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100925/2754f09e/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