On Dienstag, 9. Mai 2023 08:51:37 CEST Marc Mutz via Development wrote: > Hi, > > I'd like to propose the following clarifications: > > - no space between "operator" and it's symbol: > > // WRONG > bool operator ==(~~~~) > // CORRECT > bool operator==(~~~~) > > Rationale: that's the style we find in all of Qt, but QtC's > auto-completion (by default?) adds the space, so we should clarify what > we want (and fix QtC). > > - exactly one space each between if and constexpr/constinit and > following [({]: > > // WRONG > if constinit( > if constexpr(~~~) { > // CORRECT > if constinit { > if constexpr (~~~) { > I prefer the first ones. Though it appears the second is used 75% of the time in Qt code.
> - space after template and before <: > > // WRONG > template<class T> > // CORRECT: > template <class T> > > Rationale: We always used the latter in Qt. We have always used both. I prefer the first one, which also happens to be the default by old Qt styles, but the second one is now more common in QtCore. That said. I find discussing style-guides in general a waste of time, and will agree to anything that make us stop wasting time on this. Best regards Allan -- Development mailing list Development@qt-project.org https://lists.qt-project.org/listinfo/development