Preview of astyle-kdelibs changes up in a branch (was: Re: [Port blocker] Re: [Kexi-devel] RFC: plan for starting the Qt5/KF5 port)

Dmitry Kazakov dimula73 at gmail.com
Fri Mar 6 07:25:29 GMT 2015


Hi!

I looked through the patch and updated the google docs:
https://docs.google.com/document/d/1jhq6oXuXKvTilJhcoS6FVKO7yYRu2yCgBS9ojhc2QRU/edit#

The changes which I believe we must fix before applying it to master:

1) Inlined functions. They are not covered by the KDE style policy, so I
believe we should follow Qt- and KDE- style of handling inlined functions
with the opening brace at the signature line. It applies only to the
functions declared *and* defined inside the class itself.

2) "Wrong alignment of function parameters". See the corresponding topic in
the google docs. Astyle seems to be a bit broken here, because in some
places it applies correctly, and in some not. The units that are always
wrong are constructors.

3) "Indentation of multiline conditionals is wrong". See the corresponding
topic in the google docs. Should be 8 spaces instead of 12.

I think we should commit the patch only after we fix at least these three
issues.

(optional)
4) I really feel we must *not* follow one-line-if-always-with-braces rule.
'if (some_stuff) return 0' is perfectly ok in my opinion. But this is my
opinion only and I cannot block the patch with that. I only search for
support from other developers in this topic.


On Thu, Mar 5, 2015 at 11:05 AM, Boudewijn Rempt <boud at valdyas.org> wrote:

> On Thu, 5 Mar 2015, C. Boemann wrote:
>
>  As i already like the previous results this is just an improvement afaict.
>>
>> However, as a pure enhancement, do you know how difficult it would be to
>> reformat all ctor initialize statements to be like:
>>
>> class::class()
>>    : super()
>>    , member(val)
>> {
>>
>> I know it would require a patch, just wondering how much work it would
>> be. If you don't want to spend time on it we can keep it as it is - but we
>> have like 3 different styles in use so it would be nice to clear it up too,
>>
>>
> I would love that as well. This style of initializer lists is the easiest
> to maintain.
>
> Boudewijn
>
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
>



-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150306/477dd7b5/attachment.htm>


More information about the calligra-devel mailing list