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 <volker.hilsheimer@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Giuseppe D'Angelo 2022-03-01 16:44:14 +01:00
parent 52e523c33f
commit 44eff8f39f
5 changed files with 5 additions and 5 deletions

View File

@ -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);

View File

@ -90,7 +90,7 @@ public:
VerticalSubpixelPositioning = 0x08,
LosslessImageRendering = 0x40,
};
Q_FLAG(RenderHint)
Q_ENUM(RenderHint)
Q_DECLARE_FLAGS(RenderHints, RenderHint)
Q_FLAG(RenderHints)

View File

@ -71,7 +71,7 @@ public:
WorldAccessOption = 0x7,
AbstractNamespaceOption = 0x8
};
Q_FLAG(SocketOption)
Q_ENUM(SocketOption)
Q_DECLARE_FLAGS(SocketOptions, SocketOption)
Q_FLAG(SocketOptions)

View File

@ -163,7 +163,7 @@ public:
QualityHint = 0x01,
AnimationHint = 0x02
};
Q_FLAG(BlurHint)
Q_ENUM(BlurHint)
Q_DECLARE_FLAGS(BlurHints, BlurHint)
Q_FLAG(BlurHints)

View File

@ -143,7 +143,7 @@ public:
RotationAngleChanged = 0x2,
CenterPointChanged = 0x4
};
Q_FLAG(ChangeFlag)
Q_ENUM(ChangeFlag)
Q_DECLARE_FLAGS(ChangeFlags, ChangeFlag)
Q_FLAG(ChangeFlags)