mirror of https://github.com/qt/qtbase.git
Hide warning on deprecated NSWindowStyleMaskTexturedBackground
The enum was deprecated in macOS 10.14. The warning does show up in all Qt builds (-developer-build or not). Most users won't be qualified to do anything about the warning, so let's hide it for now. Pick-to: 6.9 6.10 Task-number: QTBUG-138829 Change-Id: I08007164eecbac4dc9708a615f34462f6f8de852 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
fc5fed5ec4
commit
1e367f2f8c
|
@ -642,9 +642,9 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
|
|||
if (type == Qt::Tool)
|
||||
styleMask |= NSWindowStyleMaskUtilityWindow;
|
||||
|
||||
// FIXME: Remove use of deprecated style mask
|
||||
// FIXME (QTBUG-138829)
|
||||
if (m_drawContentBorderGradient)
|
||||
styleMask |= NSWindowStyleMaskTexturedBackground;
|
||||
styleMask |= QT_IGNORE_DEPRECATIONS(NSWindowStyleMaskTexturedBackground);
|
||||
|
||||
if (flags & Qt::ExpandedClientAreaHint)
|
||||
styleMask |= NSWindowStyleMaskFullSizeContentView;
|
||||
|
@ -768,6 +768,7 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
|
|||
if (m_view.window.ignoresMouseEvents != ignoreMouse)
|
||||
m_view.window.ignoresMouseEvents = ignoreMouse;
|
||||
|
||||
// FIXME (QTBUG-138829)
|
||||
m_view.window.titlebarAppearsTransparent = (flags & Qt::NoTitleBarBackgroundHint)
|
||||
|| (m_view.window.styleMask & QT_IGNORE_DEPRECATIONS(NSWindowStyleMaskTexturedBackground));
|
||||
}
|
||||
|
@ -2055,7 +2056,8 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
|
|||
return;
|
||||
|
||||
if (!m_drawContentBorderGradient) {
|
||||
window.styleMask = window.styleMask & ~NSWindowStyleMaskTexturedBackground;
|
||||
// FIXME (QTBUG-138829)
|
||||
window.styleMask = window.styleMask & QT_IGNORE_DEPRECATIONS(~NSWindowStyleMaskTexturedBackground);
|
||||
setWindowFlags(QPlatformWindow::window()->flags());
|
||||
[window.contentView.superview setNeedsDisplay:YES];
|
||||
return;
|
||||
|
@ -2081,7 +2083,8 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
|
|||
|
||||
int effectiveBottomContentBorderThickness = 0;
|
||||
|
||||
[window setStyleMask:[window styleMask] | NSWindowStyleMaskTexturedBackground];
|
||||
// FIXME (QTBUG-138829)
|
||||
[window setStyleMask:[window styleMask] | QT_IGNORE_DEPRECATIONS(NSWindowStyleMaskTexturedBackground)];
|
||||
setWindowFlags(QPlatformWindow::window()->flags());
|
||||
|
||||
// Setting titlebarAppearsTransparent to YES means that the border thickness has to account
|
||||
|
|
Loading…
Reference in New Issue