make KLibrary's kde3Factory behave like kde4Factory
Thiago Macieira
thiago at kde.org
Thu Oct 11 13:21:12 BST 2007
Em Thursday 11 October 2007 13:58:57 Matthias Kretz escreveu:
> This is from qplugin.h:
> #define Q_PLUGIN_INSTANCE(IMPLEMENTATION) \
> { \
> static QPointer<QObject> _instance; \
> if (!_instance) \
> _instance = new IMPLEMENTATION; \
> return _instance; \
> }
>
> And why would a local static of non-POD type be a problem, the local static
> of K_GLOBAL_STATIC is also non-POD...
The local static in K_GLOBAL_STATIC is only used to destroy the object at
program termination. If it isn't run, it's not a problem.
I don't know why QPlugin uses that construct above. For all I know, it
shouldn't. But it's ok to use your patch then. The KDE 3-style factory is
deprecated anyways.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
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: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071011/6d35422c/attachment.sig>
More information about the kde-core-devel
mailing list