Forwarding headers for kdelibs
lee.jaison at gmail.com
Mon Nov 6 22:52:02 GMT 2006
On 11/6/06, Thiago Macieira <thiago at kde.org> wrote:
> Allen Winter wrote:
> >I wonder.. should we have a krazy check that notifies us to change
> > includes of the form
> >#include <kfoo.h> or #include "kfoo.h"
> >#include <KFoo>
> >Same question for the Qt forwarding headers.
> Why should we force ourselves to open an extra file per header included?
Be that as it may, I'd be willing to make that sacrifice in the name
of indirection and standardization.
One thing I will say: the forwarding headers will make it much easier
to catch unused headers when grepping around for things.
During porting I've come across tons of files that were including
headers for no good reason. The downside is that whenever you grep for
a class you are now likely to get two hits per file: one being the
Without a check I can't say I'll like the look of the eventual
mishmash most files will have at the top after a year or so:
Perhaps a Krazy check that only asks for the programmer to standardize
on one or the other type of include in the same file?
Another thought: Once (if?) the group forwarders are put in (#include
"KDECore" or whatever) I think requiring a group header if the file is
including a high percentage of the headers already would be nice. What
with the license, copyright, and all the headers you usually have to
scroll once or twice before you can even see any code. :)
More information about the kde-core-devel