[Development] Qt Coding style and C++11

André Hartmann andre.hartmann at iseg-hv.de
Mon Sep 18 07:59:39 CEST 2017


Hi Kevin,

Am 15.09.2017 um 10:47 schrieb Kevin Funk:
> On Friday, 15 September 2017 06:42:34 CEST André Hartmann wrote:
>> Hi, since a while C++11 is allowed in Qt and there is ongoing effort
>> porting e.g. examples to the new possibilities.
> 
> Slightly OT but I hope still useful: I'm out of the loop how you are doing
> these code transformations, but refactoring code to use C++11 member init can
> be largely automated via clang-tidy:
>    https://clang.llvm.org/extra/clang-tidy/checks/cppcoreguidelines-pro-type-member-init.html

 > I think one of the real important questions here is: Do we want to do
 > large-scale changes on our code base?

Ok, looks like an useful tool! In first case I didn't think on 
mass-conversion from old to new style; I'd like to have rules how new 
code should look like.

If existing code should be changed as drive-by or in one large commit, 
may depend on the maintainers (I already expect good arguments in both 
directions).

 > (1) I'd personally really like to see:
 > - Replacing all uses Q_DECL_OVERRIDE with override
 > - Replacing all uses Q_DECL_NULLPTR with nullptr

> That wiki page also still talks about Q_DECL_OVERRIDE, and does not mention
> nullptr either. For new code override/nullptr should always be used.

+1

André



More information about the Development mailing list