[Kde-games-devel] includes in kpat

Parker Coates parker.coates at gmail.com
Tue Dec 9 14:30:50 CET 2008


2008/12/9 Frederik Schwarzer:
> Hi,
>
> I just had a look at kpat and couldn't go through the files without resorting the includes
> a bit. One harmless position switching commit have I already done but the other one is
> a bit more stuff so I want to ask you if I am doing it right.
>
> 1. renaming all C headers foo.h -> cfoo
> 2. Qt headers with casing QFoo (and qglobal.h -> QtGlobal)
> 3. KDE headers without casing kfoo.h

As far as I know, KDE doesn't have a policy for the format of
includes. I believe we support both. So this comes down to an issue of
developer preference. My preferences match yours, but in this case
it's the maintainer, Stephan Kulow, who has the final say. You can
contact him at coolo at kde.org.

> 4. Include guards unified to FILENAME_H (in patsolve FILENAMESOLVER_H)

This one is less subjective, as I'm sure everyone would agree that
consistent guards are better, but I would still run it by coolo.

> One question:
> In cardmaps.cpp there is an include #include <carddeckinfo.h>
> The name looks like a personal header, is it really <>?

Andreas is correct on this point, although it does raise the question,
why weren't these card classes given a 'K' prefix? They're part of the
public API, so it's too late to change them now, but that should
probably happen for KDE5.

> Same for:
> <patsolve/fortyeight.h> in fortyeight.cpp
> <patsolve/golf.h> in golf.cpp
> <deck.h> in pile.cpp

As far as I know these should be quoted.

Parker


More information about the kde-games-devel mailing list