[Development] commas in ctor-init-lists

Konstantin Tokarev annulen at yandex.ru
Thu Jun 2 12:25:29 CEST 2016



01.06.2016, 15:41, "Marc Mutz" <marc.mutz at kdab.com>:
> 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

It's codified by WebKit coding style, and many people here have contributed to QtWebKit:

https://webkit.org/code-style-guidelines/#other-punctuation


> , 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
>
> --
> Marc Mutz <marc.mutz at kdab.com> | Senior Software Engineer
> KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
> Tel: +49-30-521325470
> KDAB - Qt, C++ and OpenGL Experts
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development

-- 
Regards,
Konstantin



More information about the Development mailing list