[Qgis-developer] using indentation scripts

Jürgen E. Fischer jef at norbit.de
Fri May 6 16:06:51 EDT 2011


Hi Mayeul,

On Fri, 06. May 2011 at 19:19:24 +0200, mayeul.kauffmann at free.fr wrote:
> I guess it's better to have this discussion here than on a comment of line
> 351 of src/core/symbology-ng/qgsrendererv2.cpp  at
> https://github.com/qgis/Quantum-GIS/pull/3/files#r26150

This wasn't meant get a huge discussion anyway - I was just testing the
comments on github.

My point was that the indentation of

  if ( r )
    r->setUsingSymbolLevels( element.attribute( "symbollevels", "0" ).toInt() );
    r->setUsingFirstRule( element.attribute( "firstrule", "0" ).toInt() );

suggests that the second line, which you added, is also guarded by that "if",
but it's not.

So braces are needed.  Running scripts/prepare-commit.sh would have revealed
that.  That's why I also mentioned that in the comment.

Otherwise indentation is not that important.


> Thanks for the hint! Sorry, but I do not understand from the above what to
> do.

> from where should I run the script ( my `pwd`) and with which option (I saw
> the "PATH" hack) to have it find the astyle.sh which is in the folder.

Top level, no options.  prepare-commit.sh will figure out which files were
changed and runs astyle.sh only on those.

But it's to late for that in your case anyway, as you've already committed.

Not sure what the best practice is to update the pull request.  Perhaps other
more git experienced users can comment.



Jürgen 

-- 
Jürgen E. Fischer         norBIT GmbH               Tel. +49-4931-918175-20
Dipl.-Inf. (FH)           Rheinstraße 13            Fax. +49-4931-918175-50
Software Engineer         D-26506 Norden               http://www.norbit.de

-- 
norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH
Rheinstrasse 13, 26506 Norden
GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502



More information about the Qgis-developer mailing list