Q: Rules on inclusion of own headers? how to provide header inclusion kde4-compat? (was: Re: Extending ecm_generate_headers to create cross-forwarding headers?)
Friedrich W. H. Kossebau
kossebau at kde.org
Thu Jan 16 16:57:51 UTC 2014
Am Mittwoch, 15. Januar 2014, 12:14:59 schrieb David Faure:
> On Wednesday 15 January 2014 11:01:55 Friedrich W. H. Kossebau wrote:
> > Guess you already started to tackle that? :) Or should I give it a try
> > tonight?
>
> Go ahead :)
Some questions while I go ahead:
1. How should own headers be included, what is preferred?
#include <kparts/part.h>
or
#include "part.h"
And both the same in the public headers and in the normal sources? Myself I
also use the second version, but I found a mixture in use, so wonder if one is
preferred/recommended in the frameworks.
2. How to do KDE4-compatibility for moved header content?
E.g. in event.h for KDE4-compatibility the declarations which have been moved
to their own headers would need to be pulled in again, at least for builds
using KDE4Support
Is that done by having includes in the normal file, guarded by a flag, like
// KDE4 compat
#if KDE4COMPATIBLE
#include <kparts/guiactivateevent.h>
#include <kparts/partactivateevent.h>
#include <kparts/partselectevent.h>
#endif
If so, which flag?
Or is there another way?
Cheers
Friedrich
More information about the Kde-frameworks-devel
mailing list