[Qgis-developer] Header files order

Radim Blazek radim.blazek at gmail.com
Wed Apr 24 09:02:07 PDT 2013


On Sun, Apr 21, 2013 at 9:50 AM, Martin Dobias <wonder.sk at gmail.com> wrote:
> On Sat, Apr 20, 2013 at 10:18 AM, Radim Blazek <radim.blazek at gmail.com> wrote:
>> do you agree with that order (least specific -> most specific) extend
>> for system etc (each section sorted lexically):
>>
>> * system headers
>> * standard libraries headers
>> * qt headers
>> * other 3rd party libraries headers
>> * qgis headers
>
> Personally I do not care so much about the order of the sections. I
> would say we should just:
> 1. #include the corresponding header file first (e.g. for abc.cpp the
> first include should be #include "abc.h") to ensure that the header
> file does not have some hidden include dependencies
> 2. keep each section sorted
>
> Anyway the least specific -> most specific order makes more sense than
> the opposite order.

I have modified the manual in this sense.

Radim

> Martin


More information about the Qgis-developer mailing list