[Development] kdelibs coding style

Thiago Macieira thiago at kde.org
Mon Apr 29 21:20:59 CEST 2013


On segunda-feira, 29 de abril de 2013 18.52.16, Giuseppe D'Angelo wrote:
> On 29 April 2013 18:43, Thiago Macieira <thiago at kde.org> wrote:
> > With that in mind, I would suggest we change *both* coding styles to
> > optionally permit the braces, and strongly suggest it for more-complex
> > conditionals.
> 
> In Qt the braces are already mandatory if the condition spans over
> more than one line (which is typical for complex conditions, as other
> rules demand for lines to be properly wrapped). Are you suggesting to
> loosen this?

No, I am suggesting adding that rule, because I didn't know it was there (it 
wasn't there when I last looked at the document, in my early days in 
Trolltech).

Also, Creator adds an extra indent to complex conditionals:

    if (a
            && b)
        c;

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/development/attachments/20130429/915e04fe/attachment.sig>


More information about the Development mailing list