> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On
> Behalf Of Ulf Hermann
> Sent: Monday, February 17, 2014 10:46 AM
> To: [email protected]
> Subject: Re: [Development] Rules for including private headers
> 
> > Sounds good to me. From what I read below, you just add the section
> > about private headers, right?
> 
> Yes.
> 
> >> * If you need to include qt_x11_p.h, always include it as the last
> >> header file.
> > This could go into the private headers section since it's private itself.
> 
> I'd rather just delete it. What is so significant about qt_x11_p.h that it 
> needs
> its own rule here?
> 
> > Please merge all cases into one:
> >     #include <private/whatever_p.h>
> 
> The argument for case 1 ("whatever_p.h") is that it's shorter and easier to
> see where the file is than with <private/whatever_p.h>.

> Both cases 1 and 2
> ("foo/bar/whatever_p.h") reduce the amount of indirection to look up the
> file and possibly speed up compile times that way.

I did a quick reality check on this one: 
https://codereview.qt-project.org/#change,78318 changes all _p.h includes to a 
canonical <private/xxx_p.h> format, and I couldn't measure any difference when 
compiling on windows (where filesystem accesses are traditionally slow), both 
with and without patches applied.

So I'd actually also support just using <private/xxx_p.h> everywhere.

Regards

Kai
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to