From 44eff8f39f56cfe25dbd5a8b9d289b42137d06e2 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 1 Mar 2022 16:44:14 +0100 Subject: [PATCH] Fix Q_FLAG declaration over enumerations One should use Q_ENUM, not Q_FLAG, to mark an enumeration. Q_FLAG should go on the respective flag type. Change-Id: I16cd5c0d405c3db1951569b72805fdae18898c45 Pick-to: 5.15 6.2 6.3 Reviewed-by: Volker Hilsheimer Reviewed-by: Fabian Kosmale --- src/corelib/plugin/qlibrary.h | 2 +- src/gui/painting/qpainter.h | 2 +- src/network/socket/qlocalserver.h | 2 +- src/widgets/effects/qgraphicseffect.h | 2 +- src/widgets/kernel/qgesture.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/corelib/plugin/qlibrary.h b/src/corelib/plugin/qlibrary.h index ac59f45789..f3fa0d40f5 100644 --- a/src/corelib/plugin/qlibrary.h +++ b/src/corelib/plugin/qlibrary.h @@ -63,7 +63,7 @@ public: DeepBindHint = 0x10 }; Q_DECLARE_FLAGS(LoadHints, LoadHint) - Q_FLAG(LoadHint) + Q_ENUM(LoadHint) Q_FLAG(LoadHints) explicit QLibrary(QObject *parent = nullptr); diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h index 4c854e0026..6446e88b0b 100644 --- a/src/gui/painting/qpainter.h +++ b/src/gui/painting/qpainter.h @@ -90,7 +90,7 @@ public: VerticalSubpixelPositioning = 0x08, LosslessImageRendering = 0x40, }; - Q_FLAG(RenderHint) + Q_ENUM(RenderHint) Q_DECLARE_FLAGS(RenderHints, RenderHint) Q_FLAG(RenderHints) diff --git a/src/network/socket/qlocalserver.h b/src/network/socket/qlocalserver.h index 9106bcad45..12bd2411a8 100644 --- a/src/network/socket/qlocalserver.h +++ b/src/network/socket/qlocalserver.h @@ -71,7 +71,7 @@ public: WorldAccessOption = 0x7, AbstractNamespaceOption = 0x8 }; - Q_FLAG(SocketOption) + Q_ENUM(SocketOption) Q_DECLARE_FLAGS(SocketOptions, SocketOption) Q_FLAG(SocketOptions) diff --git a/src/widgets/effects/qgraphicseffect.h b/src/widgets/effects/qgraphicseffect.h index f7c0769778..f656a9b83c 100644 --- a/src/widgets/effects/qgraphicseffect.h +++ b/src/widgets/effects/qgraphicseffect.h @@ -163,7 +163,7 @@ public: QualityHint = 0x01, AnimationHint = 0x02 }; - Q_FLAG(BlurHint) + Q_ENUM(BlurHint) Q_DECLARE_FLAGS(BlurHints, BlurHint) Q_FLAG(BlurHints) diff --git a/src/widgets/kernel/qgesture.h b/src/widgets/kernel/qgesture.h index 312962f9bf..5ccf635e2e 100644 --- a/src/widgets/kernel/qgesture.h +++ b/src/widgets/kernel/qgesture.h @@ -143,7 +143,7 @@ public: RotationAngleChanged = 0x2, CenterPointChanged = 0x4 }; - Q_FLAG(ChangeFlag) + Q_ENUM(ChangeFlag) Q_DECLARE_FLAGS(ChangeFlags, ChangeFlag) Q_FLAG(ChangeFlags)