From a14c8b45403c23748251dce43e2d06d220872a3d Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Tue, 7 Feb 2023 14:17:22 +0100 Subject: [PATCH] Qt::Appearance: don't assign values to enumerators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The compiler does that for us. This makes the enum look like an enum again. A non-flags enum shouldn't have intializers of the form 0xNNNN, as that makes it looks like flags. Found in API review. Change-Id: If49e94cdad719b7dc9e8a7b17f6883dc789e62d6 Reviewed-by: Tor Arne Vestbø (cherry picked from commit ee1bd7decd2c3e55245f89afb710543c95424221) Reviewed-by: Qt Cherry-pick Bot --- src/corelib/global/qnamespace.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index 1bf5bb6169e..d0bb4a2b85c 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -47,9 +47,9 @@ namespace Qt { }; enum class Appearance { - Unknown = 0x0000, - Light = 0x0001, - Dark = 0x0002 + Unknown, + Light, + Dark, }; enum MouseButton {