[Development] Coding convention for private includes

Thiago Macieira thiago.macieira at intel.com
Mon Jan 23 17:15:41 CET 2017


On segunda-feira, 23 de janeiro de 2017 11:00:02 PST Kevin Ottens wrote:
> > You need to be careful when including a private header from another
> > private
> > header. But if it's from a .cpp, you can use even relative paths.
> 
> What do you have in mind as risk when you say one needs to be careful?
> Would that apply for using #include <QtModule/private/foo_p.h> in other
> private headers?

No, that should be ok.

"Be careful" means not using "foo_p.h" or "../kernel/foo_p.h". There may be 
additional rules for headers that are used in the bootstrap library, but those 
won't affect you.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list