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.

Pick-to: 6.4 6.2
Change-Id: I23296117b6d9a84273da6639582e075d631e5602
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Mårten Nordheim 2022-10-24 12:47:27 +02:00
parent 70d2437e6f
commit ba4710a33f

View File

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