summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 17ded6ce59..f9c676a5b0 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1262,6 +1262,11 @@ void QCocoaWindow::recreateWindowIfNeeded()
if ((isContentView() && !shouldBeContentView) || (recreateReason & PanelChanged)) {
if (m_nsWindow) {
qCDebug(lcQpaCocoaWindow) << "Getting rid of existing window" << m_nsWindow;
+ if (m_nsWindow.observationInfo) {
+ qCCritical(lcQpaCocoaWindow) << 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()) {
// We explicitly disassociate m_view from the window's contentView,