Accidentally exported private classes
Volker Krause
vkrause at kde.org
Mon Aug 10 09:47:43 UTC 2015
Hi,
it turns out KF5 (and PIM, which is where I started looking into this) have
quite some unintentionally exported private symbols (2000+ for PIM and the KF5
subset used by it, I'd not entirely trust the tool yet though ;) ).
This is mainly caused by using nested private classes, those inherit the
visibility from their outer class:
class FOO_EXPORT Foo {
class Private;
};
Foo::Private is also exported by default in this case.
This is easy to fix by explicitly hiding the private class (by adding
Q_DECL_HIDDEN to its declaration). I've started doing this in PIM code that
isn't covered by BC guarantees yet. Do we also want this to be done in already
released frameworks, although it is technically BIC?
Most of the cases are declared in .cpp files, so not even private header files
are installed, and the sheer number of affected symbols makes this actually
practically relevant.
In any case, something to look out for in new code.
regards,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 173 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20150810/fef8c4eb/attachment.sig>
More information about the Kde-frameworks-devel
mailing list