Can Q_GLOBAL_STATIC replace KStaticDelete ?

Matthias Kretz kretz at kde.org
Fri Jan 19 11:00:41 GMT 2007


On Friday 19 January 2007 07:48, Thiago Macieira wrote:
> The code looks good.
>
> Simple, effective, easy to read.

thanks. How about the attached version? Now it will abort with a helpful error 
message if you access the global static after destruction (this would have 
spared me one day of debugging if Q_GLOBAL_STATIC had aborted instead of 
returning 0).
e.g.: accessed global static 'A *getA()' after destruction

Where should we put it in kdelibs? kglobal.h or should it get its own header?

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kglobalstatic.h
Type: text/x-chdr
Size: 1910 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070119/8aee2204/attachment.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070119/8aee2204/attachment.sig>


More information about the kde-core-devel mailing list