From 318e1ca422af1c07a0430cb03ed7e954fb9ecec0 Mon Sep 17 00:00:00 2001 From: Daniel Teske <daniel.teske@theqtcompany.com> Date: Wed, 18 Mar 2015 16:26:01 +0100 Subject: [PATCH] Coding Style: Minor tweaks due to scoped enums - Clarify that int constants should be unscoped enums. - Require enum values to duplicate the enum's type only for unscoped enums. Change-Id: Ibf63ada3a925c0fe0a364fd408cedc9638cf4708 Reviewed-by: hjk <hjk@theqtcompany.com> Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com> --- doc/api/coding-style.qdoc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/coding-style.qdoc b/doc/api/coding-style.qdoc index a1a19999db8..10ec105d4c9 100644 --- a/doc/api/coding-style.qdoc +++ b/doc/api/coding-style.qdoc @@ -238,8 +238,8 @@ \li Class names begin with a capital letter. \li Function names begin with a lower case letter. \li Variable names begin with a lower case letter. - \li Enum names and values begin with a capital letter. Enum values - contain some part of the name of the enum type. + \li Enum names and values begin with a capital letter. Unscoped Enum + values contain some part of the name of the enum type. \endlist \section2 Whitespace @@ -1058,7 +1058,7 @@ \section2 Esthetics \list - \li Prefer enums to define const over static const int or defines. + \li Prefer unscoped enums to define const over static const int or defines. Enumeration values will be replaced by the compiler at compile time, resulting in faster code. Defines are not namespace safe. \li Prefer verbose argument names in headers. -- GitLab