Re: [Development] Coding convention for private includes

2017-01-23 Thread Thiago Macieira
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  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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Coding convention for private includes

2017-01-23 Thread Kevin Ottens
Hello,

On Friday, 20 January 2017 15:06:53 CET Thiago Macieira wrote:
> On sexta-feira, 20 de janeiro de 2017 14:55:00 PST Sean Harmer wrote:
> > 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 
> > 
> > The issue is that this could lead to collisions. Is it OK to use:
> >  #include 
> > 
> > ?
> 
> 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  in other 
private headers?

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud supporter of KDE, http://www.kdab.com


smime.p7s
Description: S/MIME cryptographic signature
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


Re: [Development] Coding convention for private includes

2017-01-20 Thread Thiago Macieira
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 
> 
> The issue is that this could lead to collisions. Is it OK to use:
> 
>  #include 
> 
> ?

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

___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development


[Development] Coding convention for private includes

2017-01-20 Thread Sean Harmer
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 

The issue is that this could lead to collisions. Is it OK to use:

 #include 

?

Cheers,

Sean
--
Dr Sean Harmer | sean.har...@kdab.com | Managing Director UK
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. UK +44 (0)1625 809908, Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-independent software solutions
___
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development