Girish Ramakrishnan wrote: > Hi All, > The mixing of coding styles in the kotext code has been troubling me. So > Thomas, David and I had a discussion on the coding style used in koffice > code. We agreed that we should follow the Qt/kdelibs coding style > (http://techbase.kde.org/Policies/Kdelibs_Coding_Style). We also agreed > that any new code (in new or existing files) will be written in the new > style. > > Here's the Qt style in a nutshell. > > // indent = 4 spaces > void foo(int arg1, int arg2) > { > switch (arg1) { > case 1: // do something > case 2: // do more > default: > break; > } > > if (arg2 == 42) { > bar(arg2, arg1); > } > } > > Opinions/Thoughts? > Me likes the opening curly brace on an extra line. Additionally i tend to use some more whitespace at braces. I.e. void foo( int arg1, int arg2 ); And while at it, i don't see your example to be really consistent in itself. E.g. sometimes the opening brace is placed at an extra line, sometimes not. And there is a whitespace before the opening brace of the "if" statement, but not before the opening brace of the function header. Ciao Jan _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel