[Development] Qt Coding style and C++11

Gatis Paeglis Gatis.Paeglis at qt.io
Mon Sep 18 12:42:44 CEST 2017


> I'd like to push this discussion, because if code is converted to a new
> base, it should be clear to everyone HOW to do so.


I agree regarding consistency. If we are spending time on this, then it should be done properly. I think Qt Coding Conventions wiki should be moved to somewhere where changes can be reviewed via Gerrit.


1) It currently says:


"You have to explicitly specify the return type, if the lambda contains more than a single expression. Otherwise it does not compile with VS2010."


I guess this restriction does not apply for Qt 5.8 (dropped support for VS2010) and above? Or maybe it does, who knows. With gerrit I could add relevant reviewers, if I decide to change something in conventions page.


2) What is the convention regarding functor-based connections + signal/slot keyword usage?  See: https://codereview.qt-project.org/#/c/203550/3/examples/widgets/itemviews/storageview/storagemodel.h


Gatis.

________________________________
From: Development <development-bounces+gatis.paeglis=qt.io at qt-project.org> on behalf of André Hartmann <aha_1980 at gmx.de>
Sent: Friday, September 15, 2017 6:42:34 AM
To: development at qt-project.org
Subject: [Development] Qt Coding style and C++11

Hi, since a while C++11 is allowed in Qt and there is ongoing effort
porting e.g. examples to the new possibilities.

The section "Conventions for C++11 usage" in [1] states:

  "Note: This section is not an accepted convention yet.
   This section serves as baseline for further discussions."

I'd like to push this discussion, because if code is converted to a new
base, it should be clear to everyone HOW to do so.

What I like to add, is to encourage the use of C++11 member
initialisation. They are already used in QtSerialBus (from the
beginning) and QtCreator (ongoing changes to existing codebase).

What do you think?

Best regards,
André

[1] https://wiki.qt.io/Coding_Conventions
_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170918/a68c7115/attachment.html>


More information about the Development mailing list