summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-12-09 19:16:34 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2020-12-09 20:30:04 +0100
commitb58d6831de79ad21463e20c079093667918ee626 (patch)
tree0ad0eb84290e06877b439115f1d6ae6399396356 /src/plugins/platforms/cocoa
parentff8d757e222d0b9b8618b83e6c4186e366e917e9 (diff)
macOS: Remove warning about KVO observers on QNSWindow/QNSPanel
NSTitleBarView in Big Sur will observe the window it is in, but makes sure to remove these observers in viewWillMoveToWindow, as it should. To avoid spamming user logs with this warning we remove it. It was dubious what cases it would have caught anyways, as anyone trying to KVO observe properties Z of a child object Y of X.Y would need to track whether X changes its Y between adding and removing the observer. There are no guarantees that Y is stable, and this applies to an NSView's window property as well. Pick-to: 6.0 Pick-to: 5.15 Pick-to: 5.12 Change-Id: I27a0d04625f96c4c5d382c39ac068721ce1e8f9d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 272113545a..d52343f0b8 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1457,11 +1457,6 @@ void QCocoaWindow::recreateWindowIfNeeded()
if ((isContentView() && !shouldBeContentView) || (recreateReason & PanelChanged)) {
if (m_nsWindow) {
qCDebug(lcQpaWindow) << "Getting rid of existing window" << m_nsWindow;
- if (m_nsWindow.observationInfo) {
- qCCritical(lcQpaWindow) << m_nsWindow << "has active key-value observers (KVO)!"
- << "These will stop working now that the window is recreated, and will result in exceptions"
- << "when the observers are removed. Break in QCocoaWindow::recreateWindowIfNeeded to debug.";
- }
[m_nsWindow closeAndRelease];
if (isContentView() && !isEmbeddedView) {
// We explicitly disassociate m_view from the window's contentView,