summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-05-19 13:01:42 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-05-22 10:57:53 +0000
commite794c1bb797fad2bff579075c499d27c42055c02 (patch)
treeb88bb081fba38dd83f99f77f712e84230ec33d09
parent1051abc4800f01c43c3f24cc7d9f85d6a7acc7e0 (diff)
macOS: Remove workaround when adding view as subview
a6b34517e introduced this code as a workaround for stale QCocoaWindow pointers during event delivery, but these days QCocoaWindow is a QObject and guarded by QPointer. Disassembly of AppKit also shows that the view is removed for us, so there's no need to do it explicitly, especially as this causes two distinct event callbacks from AppKit for what should be one atomic operation. Task-number: QTBUG-42059 Change-Id: I212c894adf6aee51256ceff03c9821a995c2a63d Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index ca5f3e8992..6e06af8490 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1682,9 +1682,6 @@ void QCocoaWindow::recreateWindowIfNeeded()
setWindowFlags(window()->flags());
} else {
// Child windows have no NSWindow, link the NSViews instead.
- if ([m_view superview])
- [m_view removeFromSuperview];
-
[parentCocoaWindow->m_view addSubview:m_view];
QRect rect = windowGeometry();
// Prevent setting a (0,0) window size; causes opengl context