[Development] Coding convention for private includes
Thiago Macieira
thiago.macieira at intel.com
Sat Jan 21 00:06:53 CET 2017
On sexta-feira, 20 de janeiro de 2017 14:55:00 PST Sean Harmer wrote:
> Hi,
>
> Just a query about the coding convention around inclusion of private headers
> as specified at:
>
> https://wiki.qt.io/Coding_Conventions#Including_headers
>
> It states:
>
> If you need to include private headers, be careful. Use the following
> syntax, irrespective of which module or directory whatever_p.h is in.
>
> #include <private/whatever_p.h>
>
> The issue is that this could lead to collisions. Is it OK to use:
>
> #include <QtModule/private/whatever_p.h>
>
> ?
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.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
More information about the Development
mailing list