[Development] Naming convention for (scoped) enums

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Thu May 17 10:24:48 CEST 2018


Il 17/05/2018 10:14, Alex Blasche ha scritto:
> In case of scoped enums this becomes a superfluous rule as the type has to be mentioned anyway. Does anybody object to modifying the above definition by adding an exception for scoped enums where you do not have to repeat a part of the enum type name?

I approve of the change. In Qt 5.11 we've already started introducing 
enum classes that do not repeat the enumeration name in the enumerators 
(e.g. QAbstractItemModel::CheckIndexOption). I would also double-down 
and say that every new enumeration in Qt has to be an enum class.

My 2 cents,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4007 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20180517/279e7b60/attachment.bin>


More information about the Development mailing list