diff options
author | MÃ¥rten Nordheim <marten.nordheim@qt.io> | 2022-10-24 12:47:27 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-10-25 14:57:19 +0000 |
commit | b3f15cae22355eb95660a44b2e7c6981fe78ac15 (patch) | |
tree | 35bfa58fe0a53d5a5a4a2f04a292f1a6952636c4 /src/plugins | |
parent | 5e049224db6a76961047f20452d0ec67c58c3882 (diff) | |
download | qtbase-b3f15cae22355eb95660a44b2e7c6981fe78ac15.tar.gz |
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>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/windows/qtwindowsglobal.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qtwindowsglobal.h b/src/plugins/platforms/windows/qtwindowsglobal.h index 9a65603e24..75f984b4b0 100644 --- a/src/plugins/platforms/windows/qtwindowsglobal.h +++ b/src/plugins/platforms/windows/qtwindowsglobal.h @@ -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 |