Coding style: block braces in switch cases

Sergio Martins iamsergio at gmail.com
Mon Jan 13 17:49:17 GMT 2014


On Monday, January 13, 2014 17:05:04 Kevin Krammer wrote:
> 
> I've looked around and found quite a variation:
> 
> e.g. qdatetime.cpp:
> switch (...) {
> case Foo: {
>     }
> }
> 
> e.g. qrasterizer.cpp:
> switch (...) {
> case Foo:
>     {
>     }
> }



> e.g. qcommandlineparser.cpp:
> switch (...) {
> case Foo:
> {
> }
> }
> 
> e.g. qlocale.cpp:
> switch (...) {
> case Foo: {
> }
> }

Hi,

Personally I think it doesn't matter and we shouldn't enforce such fine grained 
policy, it makes it hard to remember and I don't want to read the guidelines 
whenever I code.

In any case, if something is to be improved in the style guidelines, please 
submit it to Qt first. We took the steps to get rid of the kdepim style to get 
close to the Qt style, so lets not start diverging again.




Regards,
Sérgio Martins

_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/




More information about the kde-core-devel mailing list