Use Q_GLOBAL_STATIC where K_GLOBAL_STATIC is not needed?
Thiago Macieira
thiago at kde.org
Thu Feb 10 19:42:42 GMT 2011
On Thursday, 10 de February de 2011 19:57:42 Alex Fiestas wrote:
> On 02/10/2011 09:04 AM, Thiago Macieira wrote:
> > Even if that is the case, KDE should use K_GLOBAL_STATIC, which is
> > better than Q_GLOBAL_STATIC.
>
> I don't know why is better (I haven't check the code) but then, maybe we
> can add a new public macro to Qt with the goodness of K_GLOBAL_STATIC
> and set Q_GLOBAL_STATIC as deprecated.
Q_GLOBAL_STATIC is not public API, like I said before. Its only use is for
Qt's own code. It doesn't need the extra goodness from KDE (a destroy
function, a way to check if it has been destroyed, the macro doesn't produce a
function, etc.)
It should have been in a qglobalstatic_p.h. We might even do that -- and
intentionally break applications that are abusing the API.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- 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-core-devel/attachments/20110210/f6246367/attachment.sig>
More information about the kde-core-devel
mailing list