QWindowsKeyMapper: replace legacy values with new one

Replace the legacy MF_ constants with the new MFS_ constants,
MFS_ENABLED is the same (0x0), and MFS_GRAYED is equal to
(MF_DISABLED | MF_GRAYED)

Change-Id: Ib0bf166d9c7f09d38026c9bf01d8bf05982f88c4
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
Yuhang Zhao 2022-09-02 22:01:16 +08:00
parent 35649760e5
commit 0d7b8a0d9e

View File

@ -778,8 +778,8 @@ static void showSystemMenu(QWindow* w)
if (!menu)
return; // no menu for this window
#define enabled (MF_BYCOMMAND | MF_ENABLED)
#define disabled (MF_BYCOMMAND | MF_GRAYED)
#define enabled (MF_BYCOMMAND | MFS_ENABLED)
#define disabled (MF_BYCOMMAND | MFS_GRAYED)
EnableMenuItem(menu, SC_MINIMIZE, (topLevel->flags() & Qt::WindowMinimizeButtonHint) ? enabled : disabled);
const bool maximized = IsZoomed(topLevelHwnd);