[Development] Resolving coding style contentions

Thiago Macieira thiago.macieira at intel.com
Mon Nov 19 17:37:07 CET 2018


On Monday, 19 November 2018 02:34:09 PST Edward Welbourne wrote:
> I note a glaring exception to that: after the opening parenthesis of
> a parameter list, if the line would otherwise be too long:
> 
>   auto variable =
> QCharacteristicallyVerboseClassName::characteristicallyLongFunctionName(
> firstParameter, secondParameter, thirdParameter, fourthParameter);
> 
> is tolerated (well, maybe not the naming ...), but a space *without*
> the line-break between open-paren and firstParameter is forbidden.

Right, when your line would be too long, you need to break *somewhere*. Take 
this example of a long sequence with no spacing:

	
QObject::tr("%1%2%3%4").arg(someFunction()).arg(otherFunction()).arg(thirdFunction()).arg(lookMaNoSpaces());

This has no space at all, so much that not even the email composer can break 
it anywhere.

In this case, it's often that we break before the dot, so the next line starts 
with punctuation.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center






More information about the Development mailing list