qtwindowsglobal: Fix mixed-enum operations warning
With c++20 doing operations between different enums is warning(-as-error). Declare operator-overloads for a particular pair of enums to make this compile again. Requires giving one of them a name as it was previously unnamed. Change-Id: I23296117b6d9a84273da6639582e075d631e5602 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> (cherry picked from commit ba4710a33f408508772464c1e98ecab4378e4ecc) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
5e049224db
commit
b3f15cae22
@ -65,7 +65,7 @@ QT_BEGIN_NAMESPACE
|
||||
namespace QtWindows
|
||||
{
|
||||
|
||||
enum
|
||||
enum WindowsEventTypeFlags
|
||||
{
|
||||
WindowEventFlag = 0x10000,
|
||||
MouseEventFlag = 0x20000,
|
||||
@ -146,6 +146,8 @@ enum WindowsEventType // Simplify event types
|
||||
GestureEvent = 124,
|
||||
UnknownEvent = 542
|
||||
};
|
||||
Q_DECLARE_MIXED_ENUM_OPERATORS(bool, WindowsEventTypeFlags, WindowsEventType);
|
||||
Q_DECLARE_MIXED_ENUM_OPERATORS(bool, WindowsEventType, WindowsEventTypeFlags);
|
||||
|
||||
// Matches Process_DPI_Awareness (Windows 8.1 onwards), used for SetProcessDpiAwareness()
|
||||
enum ProcessDpiAwareness
|
||||
|
Loading…
x
Reference in New Issue
Block a user