[Development] Qt Coding style and C++11

Kevin Funk kevin.funk at kdab.com
Mon Sep 25 12:20:56 CEST 2017


On Friday, 15 September 2017 10:47:02 CEST Kevin Funk wrote:
> 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-m
> ember-init.html
> 
> 
> More towards your question:
> 
> I think one of the real important questions here is: Do we want to do large-
> scale changes on our code base?
> 
> (1) I'd personally really like to see:
> - Replacing all uses Q_DECL_OVERRIDE with override
> - Replacing all uses Q_DECL_NULLPTR with nullptr

For the record, this is mostly done in dev branch now.

See my patch series:
https://codereview.qt-project.org/#/q/owner:%22Kevin+Funk+%253Ckevin.funk
%2540kdab.com%253E%22++message:Q_DECL_OVERRIDE,n,z
https://codereview.qt-project.org/#/q/owner:%22Kevin+Funk+%253Ckevin.funk
%2540kdab.com%253E%22++message:Q_NULLPTR,n,z
https://codereview.qt-project.org/#/q/owner:%22Kevin+Funk+%253Ckevin.funk
%2540kdab.com%253E%22++message:Q_DECL_FINAL,n,z

(PS: the changes replacing Q_NULLPTR with nullptr across the modules are not 
reviewed yet, though)

Regards,
Kevin

> (2) And maybe your request:
> (snip)


-- 
Kevin Funk | kevin.funk at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5322 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170925/53572bca/attachment.bin>


More information about the Development mailing list