From f415d86d1e88410d22607729ec7f5485a70fc2ad Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Wed, 2 Jan 2013 16:42:16 +0100 Subject: Cocoa: Fix zombie NSScreen crash While the Cocoa documentation says we should not cache [NSScreen screens], it seems that we should not cache its referenced objects either. This caused a crash in desktop components when using Dial because, given the way it is being rendered, we need to know the screen pixel ratio. Task-number: QTCOMPONENTS-1279 Change-Id: If5c3c6f14d04925215b9dca011143a2056a68846 Reviewed-by: J-P Nurmi Reviewed-by: Richard Moe Gustavsen --- src/plugins/platforms/cocoa/qcocoaintegration.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.h') diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h index e455a3552e..69801a69f1 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.h +++ b/src/plugins/platforms/cocoa/qcocoaintegration.h @@ -80,11 +80,11 @@ public: // ---------------------------------------------------- // Additional methods void setVirtualSiblings(QList siblings) { m_siblings = siblings; } - NSScreen *osScreen() const { return m_screen; } + NSScreen *osScreen() const; void updateGeometry(); public: - NSScreen *m_screen; + int m_screenIndex; QRect m_geometry; QRect m_availableGeometry; QDpi m_logicalDpi; -- cgit v1.2.3