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

Andras Mantia amantia at kde.org
Sun Sep 26 08:51:11 BST 2010


Kevin Krammer wrote:

> 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.
> 

 KMKernel is already a QObject based singleton, so as long as it works now, 
it should work once I have a singleton in the lib as well. :) 
Good point neverthless.
Nitpick: it can be used, just be careful where the event loop is running, 
eg. calling a regular method of the singleton should be safe, while using 
signals/slots might not be.

Andras
_______________________________________________
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