diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-10-18 13:58:30 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2016-10-18 13:59:52 +0200 |
commit | e61833a1e59cea9718d29a954f91dbb1d7dac3c3 (patch) | |
tree | e5415bd97ba7b21181dc2a8dc048aba08155e496 /src/plugins/platforms/cocoa/qcocoawindow.mm | |
parent | 45580aa92557caa4f3f5be783573ddb80602e494 (diff) | |
parent | 542a76c490cee7359f9c5116248977cab72b7b63 (diff) |
Merge branch 5.8 into dev
Conflicts:
src/plugins/platforms/cocoa/qnsview.mm
Change-Id: I655e8d04cece341e8b9fb69e94c09335ffa108e1
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index f87ddab455..2d4e53a420 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -388,7 +388,7 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw) if (tlw->type() == Qt::ForeignWindow) { m_view = (NSView *)WId(tlw->property("_q_foreignWinId").value<WId>()); } else { - m_view = [[QNSView alloc] initWithQWindow:tlw platformWindow:this]; + m_view = [[QNSView alloc] initWithCocoaWindow:this]; // Enable high-dpi OpenGL for retina displays. Enabling has the side // effect that Cocoa will start calling glViewport(0, 0, width, height), // overriding any glViewport calls in application code. This is usually not a @@ -433,13 +433,6 @@ QCocoaWindow::~QCocoaWindow() if (window()->type() != Qt::ForeignWindow) [[NSNotificationCenter defaultCenter] removeObserver:m_view]; - // The QNSView object may outlive the corresponding QCocoaWindow object, - // for example during app shutdown when the QNSView is embedded in a - // foregin NSView hiearchy. Clear the pointers to the QWindow/QCocoaWindow - // here to make sure QNSView does not dereference stale pointers. - if (window()->type() != Qt::ForeignWindow) - [qnsview_cast(m_view) clearQWindowPointers]; - // While it is unlikely that this window will be in the popup stack // during deletetion we clear any pointers here to make sure. if (QCocoaIntegration::instance()) { |