[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: [Development] kdelibs coding style
From:       Thiago Macieira <thiago () kde ! org>
Date:       2013-04-29 19:20:59
Message-ID: 2007475.qFe0veRI2Z () tjmaciei-mobl2
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On segunda-feira, 29 de abril de 2013 18.52.16, Giuseppe D'Angelo wrote:
> On 29 April 2013 18:43, Thiago Macieira <thiago@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

["signature.asc" (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic