On Wed, Jun 1, 2016 at 2:41 PM, Marc Mutz <[email protected]> wrote:

> Hi,
>
> There seems to have been a silent underground move to uglify the Qt sources
> , by using commas to introduce lines
> . I have no idea where this came from
> , but it looks butt
> -ugly and it is in violation of http
> ://wiki
> .qt
> .io
> /Qt_Coding_Style
>
> QFoo::QFoo()
>   : QBase(),
>     m_f1(),
>     m_f2()
> {
>
> }
>
> -not-
>
> QFoo::QFoo()
>   : QBase()
>   , m_f1()
>   , m_f2()
> {
>
> }
>
> (http://wiki.qt.io/Qt_Coding_Style#Line_breaks 2nd item: "Commas go at the
> _end_ of wrapped lines")
>
> Thanks,
> Marc
>
>
The "butt-ugly" style looks more readable to me.
And imho it reduces the possibility of forgetting a forgetting a comma in
the begin since then your arguments will look out of alignment.

Funny in the coding style you mention. For operators: "An operator at the
end of the line is easy to miss if the editor is too narrow." The exact
same could be said for commas at the end of the line.
_______________________________________________
Development mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to