[Kde-pim] Re: Kdepim coding style: indentation

David Jarvie djarvie at kde.org
Tue Mar 1 15:39:02 GMT 2011


On Tue, March 1, 2011 2:40 pm, John Layt wrote:
> On Tuesday 01 March 2011 13:46:44 David Jarvie wrote:
>> I'd like to propose that the kdepim coding standard
>> http://community.kde.org/KDE_PIM/Development/CodingStyle/Korganizer
>> should
>> be amended to allow indentation with either 2 or 4 spaces. To avoid
>> confusion when reading code, the two indentations should not, of course,
>> be mixed together. The standard should stipulate that the same
>> indentation
>> should be used throughout each source file. Alternatives might be that
>> each subdirectory, or each function, can have its own indentation.
>
> I'd like the policy to be "For all new files use the kdelibs/Qt coding
> standard" (i.e. 4 spaces), with existing files remaining with the current
> style unless the maintainer chooses to re-indent (all all that implies for
> merge and blame).  This will ensure we move towards consistency with
> kdelibs/kdebase over time.
>
> http://techbase.kde.org/Policies/Kdelibs_Coding_Style

On Tue, March 1, 2011 2:16 pm, Sérgio Martins wrote:
> I suggest the same indentation be used in the same library/application
> instead of by file.
> Lots of applications have individual maintainers ( kfacebook, kalarm,
> ktimetracker... ) and they might not like random files with a
> different indentation.

Currently, the coding standard only applies to certain
libraries/applications, mainly those which have had multiple contributors
- KMail, KOrganizer, some of the libraries. I wasn't suggesting that the
coding standard should be widened to apply to other applications which
have separate maintainers, or libraries which belong with them, unless the
maintainers so wish.

I like John's suggestion, but because there are other differences than
just indentation between the kdepim and kdelibs standards, others may
disagree.

Some libraries are groupings of several libraries, e.g.
kdepim-runtime/kresources. If we decide that a single indentation should
apply across a whole application/library, these libraries IMO should allow
each sub-library to use its own indentation.

-- 
David Jarvie.
KDE developer.
KAlarm author - http://www.astrojar.org.uk/kalarm

_______________________________________________
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-pim mailing list