Use Q_GLOBAL_STATIC where K_GLOBAL_STATIC is not needed?

Stephen Kelly steveire at gmail.com
Thu Feb 10 21:35:20 GMT 2011


Thiago Macieira wrote:

> On Thursday, 10 de February de 2011 21:08:05 Stephen Kelly wrote:
>> Thiago Macieira wrote:
>> > It should have been in a qglobalstatic_p.h. We might even do that --
>> > and intentionally break applications that are abusing the API.
>> 
>> A quick grep says that would break akonadi, grantlee, qca, phonon, qxt
>> and a couple of places in KDE that use it already (presumably they don't
>> need the features of K_GLOBAL_STATIC that you mentioned). If you (re)move
>> it, we'd all just end up copying the macro into our own codebases, so
>> that wouldn't achieve much.
> 
> Phonon should have a copy of K_GLOBAL_STATIC.
> 

I noticed K_GLOBAL_STATIC uses QBasicAtomicPointer, which doesn't seem to be 
public API. Is that going away too? That would break K_GLOBAL_STATIC.

http://doc.qt.nokia.com/latest/qbasicatomicpointer.html





More information about the kde-core-devel mailing list