diff options
-rw-r--r-- | src/corelib/global/qnamespace.h | 2 | ||||
-rw-r--r-- | src/corelib/global/qnamespace.qdoc | 6 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 15 |
3 files changed, 5 insertions, 18 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index ffc3989815..87e5153964 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -528,7 +528,7 @@ namespace Qt { AA_DisableShaderDiskCache = 27, AA_DontShowShortcutsInContextMenus = 28, AA_CompressTabletEvents = 29, - AA_DisableWindowContextHelpButton = 30, // ### Qt 6: remove me + // AA_DisableWindowContextHelpButton = 30, AA_DisableSessionManager = 31, // Add new attributes before this line diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc index cff2fab398..480d96acc7 100644 --- a/src/corelib/global/qnamespace.qdoc +++ b/src/corelib/global/qnamespace.qdoc @@ -280,12 +280,6 @@ \e glProgramBinary(). In the unlikely event of this being problematic, set this attribute to disable all disk-based caching of shaders. - \value AA_DisableWindowContextHelpButton Disables the WindowContextHelpButtonHint - by default on Qt::Sheet and Qt::Dialog widgets. This hides the \gui ? button - on Windows, which only makes sense if you use \l QWhatsThis functionality. - This value was added in Qt 5.10. In Qt 6, WindowContextHelpButtonHint - will not be set by default. - \value AA_DisableSessionManager Disables the QSessionManager. By default Qt will connect to a running session manager for a GUI application on supported platforms, use of a session manager may be diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 7be83c1837..08479a4a37 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -967,18 +967,11 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w) flags |= Qt::WindowSystemMenuHint; flags |= Qt::WindowTitleHint; } - if (customize) - ; // don't modify window flags if the user explicitly set them. - else if (type == Qt::Dialog || type == Qt::Sheet) { + if (!customize) { // don't modify window flags if the user explicitly set them. flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; - // ### fixme: Qt 6: Never set Qt::WindowContextHelpButtonHint flag automatically - if (!QApplicationPrivate::testAttribute(Qt::AA_DisableWindowContextHelpButton)) - flags |= Qt::WindowContextHelpButtonHint; - } else if (type == Qt::Tool) - flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint; - else - flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | - Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint; + if (type != Qt::Dialog && type != Qt::Sheet && type != Qt::Tool) + flags |= Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowFullscreenButtonHint; + } if (w->testAttribute(Qt::WA_TransparentForMouseEvents)) flags |= Qt::WindowTransparentForInput; } |