[Qt-creator] C++11 in Creator's source: Update required features

Christian Kandeler christian.kandeler at theqtcompany.com
Mon Mar 9 17:13:53 CET 2015


On 03/09/2015 12:02 PM, Daniel Teske wrote:
> If anyone wants to propose a coding style, please come forward.

For the "override" keyword, the following two rules seem to make sense:
     1) It is recommended [Strongly recommended? Required?] to use the 
"override" keyword when overriding virtual functions. [Do we still need 
an exception for destructors?]
     2) Make sure derived classes are consistent in their use of the 
keyword, i.e. don't have overridden functions with and without the 
keyword in the same class.

Now, how to deal with "legacy code"?
Approach 1: Add overrides in a dedicated patch. Not manually, of course, 
but using clang-modernize.
Approach 2: Adapt classes when we add a new overriding function. This 
would introduce unrelated changes to patches.
Approach 3: Leave existing classes alone. This seems wrong and is only 
listed here for completeness.
Opinions?


Christian




More information about the Qt-creator mailing list