kdelibs coding style

Matthias Kretz kretz at kde.org
Fri Jul 21 15:13:24 BST 2006

My impression is that in kdecore and kdeui, at least, there's no consistent 
style and the proposed Qt style often comes closest to what is there already.

OTOH there's Phonon in kdelibs which is 100% consistent with tabs for indent, 
no space after keywords, spaces inside parenthesis and opening braces always 
after a newline. (Pretty much opposite to what the Qt style guide says).

I'm considering changing the style of Phonon in one go to the Qt style. 
The "svn blame" loss won't be that bad because if you do a svn blame on 
arbitrary Phonon code atm you'll only find mkretz to blame. :-)

If Phonon were not to be changed in one big commit I'd fight against commits 
in a Qt coding style as that would make the code really ugly. I believe we 
should identify libs that are consistent already and then document the coding 
style accordingly. It would be best if editor support for all different 
coding styles could be added so that the programmer doesn't really have to 
think much about the coding style and just hack away...

On Friday 21 July 2006 12:16, David Jarvie wrote:
> My impression is that many files in kdelibs do have reasonably consistent
> styles. If people use a different style when editing them, this will result
> in unnecessary mess and difficulty reading them. I think that the new style
> should only apply either to new files, to files which are being
> substantially rewritten, or to files which already have no clear style.
> Otherwise, for small edits, the existing style of the file should be
> adhered to. Surely there are many files which are unlikely to be changed
> substantially in the foreseeable future, and this would help to maintain
> readability (unless a decision is taken to do a mass restyling).

Matthias Kretz (Germany)                            <><
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060721/d48fbf4c/attachment.sig>

More information about the kde-core-devel mailing list