[Development] Resolving coding style contentions

Thiago Macieira thiago.macieira at intel.com
Sun Nov 18 20:49:09 CET 2018


On Sunday, 18 November 2018 05:30:26 PST Sze Howe Koh wrote:
> I'd just like to know: Did the Qt Project ever reach a decision? If not,
> how can we reach one?

I don't think we did. Right now, it's up to the maintainer's discretion.

QtCore opts into the rule: newlines are whitespace. 

Corollary: you can only insert a newline where a space is allowed by the 
coding convention. And since our coding conventions are that commas and semi-
colons have no space to the left, you can't insert a newline there either.

Exception: complex #if, as in the declaration of qCompilerCpuFeatures in 
qsimd_p.h and qsimd_x86_p.h:

static const quint64 qCompilerCpuFeatures = 0
#if defined __ARM_NEON__
        | CpuFeatureNEON
#endif
#if defined __ARM_FEATURE_CRC32
        | CpuFeatureCRC32
#endif
#if defined __mips_dsp
        | CpuFeatureDSP
#endif
#if defined __mips_dspr2
        | CpuFeatureDSPR2
#endif
        ;

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center






More information about the Development mailing list