Directory organization for frameworks with a namespace
Alexander Neundorf
neundorf at kde.org
Sat Oct 27 16:00:59 UTC 2012
On Thursday 25 October 2012, David Faure wrote:
> Our standard directory structure for frameworks is like
> staging/kwidgets/src/dialogs/kdialog.h
> where "dialogs" is an arbitrary subdir name,
> which works fine for such easy cases (#include <kdialog.h>)
>
> But what about frameworks which want to use a namespace for their headers,
> (#include <framework/foo.h>), like kjs and kio?
>
> I solved the issue for kjs by using "kjs" as the name of the subdirectory:
> tier1/kjs/src/kjs/
>
> But in KIO, for source compat reasons, we want kio/job.h and
> kio/renamedialog.h although the first one will be in "kiocore" and the
> second in "kiowidgets". So a single subdir doesn't work.
>
> I started to create a staging/kio/src/core but this will break "kio/job.h"
> from other public headers.
>
> The only "quick" solution I can think of is
> staging/kio/src/core/kio/ and
> staging/kio/src/widgets/kio/
> with nothing else under core and widgets, which looks a bit ugly.
I think I would go with that option.
> The Qt solution would be to generate headers in staging/kio/include/kio
> which forward to src/core and src/widgets ... but we don't have such a
> solution at hand AFAIK. Any volunteer? Should I write this?
Personally, I don't like these forwarding headers very much.
Alex
More information about the Kde-frameworks-devel
mailing list