summaryrefslogtreecommitdiffstats
path: root/src/corelib/kernel/qmetatype_p.h
diff options
context:
space:
mode:
authorYulong Bai <yulong.bai@qt.io>2019-05-09 18:23:57 +0200
committerYulong Bai <yulong.bai@qt.io>2019-05-09 17:56:22 +0000
commitdaaa55725969aed87665c366d7cc96304c4e5f4c (patch)
treebaa464487621ded2dd6d430264e736e8141d9c15 /src/corelib/kernel/qmetatype_p.h
parent2b7edd053404f4819abf0203bb9c762799849638 (diff)
QTypeModuleInfo: fix clang '-wconstant-logical-operand' warnings
Clang generates a 'constant-logical-operand' warning when it finds a non-boolean constant in a logical operation. Just make the enum's base type as bool here to suppress the warning. Change-Id: Ie53f53fa54f57535f89598bdabc4d893f6a1cc32 Fixes: QTBUG-75737 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/kernel/qmetatype_p.h')
-rw-r--r--src/corelib/kernel/qmetatype_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/kernel/qmetatype_p.h b/src/corelib/kernel/qmetatype_p.h
index 94e9228778..0846193e66 100644
--- a/src/corelib/kernel/qmetatype_p.h
+++ b/src/corelib/kernel/qmetatype_p.h
@@ -87,7 +87,7 @@ template<> \
class QTypeModuleInfo<TYPE > \
{ \
public: \
- enum Module { \
+ enum Module : bool { \
IsCore = (((MODULE) == (QModulesPrivate::Core))), \
IsWidget = (((MODULE) == (QModulesPrivate::Widgets))), \
IsGui = (((MODULE) == (QModulesPrivate::Gui))), \