KDE_NO_EXPORT
Frans Englich
englich at kde.org
Mon Jul 17 17:55:14 BST 2006
On Monday 17 July 2006 15:55, Allen Winter wrote:
> On Monday 17 July 2006 11:40, Thomas Zander wrote:
> > On Monday 17 July 2006 17:01, Allen Winter wrote:
> > > It seems to me that public library classes should either be
> > > KDE_EXPORTed or KDE_NO_EXPORTed. True?
> >
> > If there is a class in kdelibs that is not _used_ by a class outside that
> > same library, but should have had the EXPORT macro, then something is
> > wrong and it should either not be in kdelibs or it should indeed not be
> > exported.
> > This means that in practice its unneeded to have this NO_EXPORT as
> > forgetting the export will very quickly make a compile (elsewhere) fail.
> >
> > Because of that, I personally see no advantage in having this, and I
> > think the only result is more work and hard to track down copy-paste
> > errors.
>
> Oh, sorry. I wasn't clear.
> I didn't mean for kdelibs, but for any library anywhere in KDE.
>
> I am writing a krazy plugin to detect missing FOO_EXPORT macros
> on public class definitions. In my testing in kdepimlibs/kcal I found
> a few such instances. If, for some reason, the class shouldn't
> have the FOO_EXPORT (like there are a couple classes with a
> @internal doxygen tag), then should they be explicitly KDE_NO_EXPORTed
> ??
I see the clarity achieved by communicating that explicitly. Since it would be
redundant(right?) it wouldn't be possible to verify that the macro is
properly used and hence slowly fade into a mixture of classes that has and
those who don't, I think. Or rather, in that case one would depend on Krazy
to tell what's right and wrong. It would be a lot of classes without
_NO_EXPORT keywords.
I think exported/unexported, or public/non-public if one prefers, should be
communicated clearly on some level. Some time ago Adriaan and I discussed
communicating this in Doxygen and for that reason the @bc alias
exists(kdelibs/doc/common/Doxyfile.global, line 171).
Perhaps it can somehow be combined such that only one keyword, not both @bc
and *_NO_EXPORT, can be used for all this.
Cheers,
Frans
More information about the kde-core-devel
mailing list