From d3eca6874451cca97f203dc2ebd683e75999e8bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 11 Nov 2024 21:36:45 +0100 Subject: [PATCH] Deprecate Qt::MacWindowToolBarButtonHint It is an old remnant from the Carbon port, and has been a no-op since Qt 5. [ChangeLog][macOS] The Qt::MacWindowToolBarButtonHint flag has been deprecated, as it has been a no-op since Qt 5. Task-number: QTBUG-127634 Change-Id: Ibe0dee5bea423a2fd320806d2751326b3e4a4508 Reviewed-by: Volker Hilsheimer --- src/corelib/global/qnamespace.h | 5 ++++- src/corelib/global/qnamespace.qdoc | 3 +-- tests/manual/diaglib/qwindowdump.cpp | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index efb059257f8..2f454a442df 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -240,7 +240,10 @@ namespace Qt { CustomizeWindowHint = 0x02000000, WindowStaysOnBottomHint = 0x04000000, WindowCloseButtonHint = 0x08000000, - MacWindowToolBarButtonHint = 0x10000000, +#if QT_DEPRECATED_SINCE(6, 9) + MacWindowToolBarButtonHint Q_DECL_ENUMERATOR_DEPRECATED_X( + "This flag has been a no-op since Qt 5") = 0x10000000, +#endif BypassGraphicsProxyWidget = 0x20000000, NoDropShadowWindowHint = 0x40000000, WindowFullscreenButtonHint = 0x80000000 diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index 231087350e7..38f5db2a207 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -2302,8 +2302,7 @@ \value WindowContextHelpButtonHint Adds a context help button to dialogs. On some platforms this implies Qt::WindowSystemMenuHint for it to work. - \value MacWindowToolBarButtonHint On \macos adds a tool bar button (i.e., - the oblong button that is on the top right of windows that have toolbars). + \omitvalue MacWindowToolBarButtonHint \value WindowFullscreenButtonHint On \macos adds a fullscreen button. diff --git a/tests/manual/diaglib/qwindowdump.cpp b/tests/manual/diaglib/qwindowdump.cpp index 9c71c0ae9b5..8e48db449f7 100644 --- a/tests/manual/diaglib/qwindowdump.cpp +++ b/tests/manual/diaglib/qwindowdump.cpp @@ -79,7 +79,6 @@ void formatWindowFlags(QTextStream &str, Qt::WindowFlags flags) debugFlag(str, flags, Qt::NoDropShadowWindowHint) debugFlag(str, flags, Qt::WindowFullscreenButtonHint) debugFlag(str, flags, Qt::WindowStaysOnBottomHint) - debugFlag(str, flags, Qt::MacWindowToolBarButtonHint) debugFlag(str, flags, Qt::BypassGraphicsProxyWidget) }