diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-05-19 12:25:38 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2017-05-22 10:57:49 +0000 |
commit | 1051abc4800f01c43c3f24cc7d9f85d6a7acc7e0 (patch) | |
tree | 3160968eab58dab2a6e3618e809546da4d73bcf9 | |
parent | 5336e061ece349f5622548f2cbbd7f7d88574d33 (diff) |
macOS: Remove workaround when setting view as content view
abde2a59c60 introduced this code on the basis that setContentView
does not remove the view from its superview, but disassembly of
AppKit shows that it does. Since commit 52767b8ee754 we also
ensure that the previous NSWindow has its contentView property
cleared, so this workaround is no longer needed.
Task-number: QTBUG-39628
Change-Id: I21e179263d006f3af1f8a55e9e2f7e8eeab2a632
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.mm | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index b2a434b550..ca5f3e8992 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1655,11 +1655,7 @@ void QCocoaWindow::recreateWindowIfNeeded() // Move view to new NSWindow if needed if (newWindow) { [m_view setPostsFrameChangedNotifications:NO]; - [m_view retain]; - if (m_view.superview) // m_view comes from another NSWindow - [m_view removeFromSuperview]; [newWindow setContentView:m_view]; - [m_view release]; [m_view setPostsFrameChangedNotifications:YES]; m_nsWindow = newWindow; |