diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2013-01-02 16:42:16 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-04 13:20:06 +0100 |
commit | f415d86d1e88410d22607729ec7f5485a70fc2ad (patch) | |
tree | b5ea493dc9faad3af1162f739f0269b8ed0050ce /src/plugins/platforms/cocoa/qcocoaintegration.h | |
parent | d75b21790162694ce5f595ddf330af06df09644b (diff) |
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 <jpnurmi@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.h')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoaintegration.h | 4 |
1 files changed, 2 insertions, 2 deletions
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<QPlatformScreen *> 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; |