From 4e1ad21b799a1be1aaea098ff5fc2c7f4f786121 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 18 Jan 2025 02:28:46 +0200 Subject: [PATCH] Accommodate more space for new shapes in Qt::CursorShape in Qt 7 Currently, the Qt::CursorShape enum can accommodate only two new shapes because Qt::LastCursor must be less than Qt::BitmapCursor. The cursor shapes change rarely but it would be nice to keep them open for extension in order to be able to react to new UI/UX ideas if needed. Change-Id: I53ed9d742a09bb06bab73a906643c62a77a207b0 Reviewed-by: Shawn Rutledge Reviewed-by: Fabian Kosmale --- src/corelib/global/qnamespace.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index a37b87546a6..f9460b8ecb8 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -1185,8 +1185,13 @@ namespace Qt { DragMoveCursor, DragLinkCursor, LastCursor = DragLinkCursor, +#if QT_VERSION < QT_VERSION_CHECK(7, 0, 0) BitmapCursor = 24, - CustomCursor = 25 + CustomCursor = 25, +#else + BitmapCursor = 0x100, + CustomCursor = 0x101, +#endif }; enum TextFormat {