From 73e68a9c0f8b6eb2873822efdae3dbb7c98a86d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Wed, 26 Oct 2016 14:47:43 +0200 Subject: macOS: Keep reference to NSScreen instead of mapping QCocoaScreen by index MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're mostly using the result of looking up the index anyways. Change-Id: I2ada58a9e6159a567691568b42fef76a82797eb3 Reviewed-by: Erik Verbruggen Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/cocoa/qcocoaintegration.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 85ea2d8ba9..892ff6e00f 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.h +++ b/src/plugins/platforms/cocoa/qcocoaintegration.h @@ -61,7 +61,7 @@ QT_BEGIN_NAMESPACE class QCocoaScreen : public QPlatformScreen { public: - QCocoaScreen(int screenIndex); + QCocoaScreen(NSScreen *screen); ~QCocoaScreen(); // ---------------------------------------------------- @@ -84,11 +84,11 @@ public: // ---------------------------------------------------- // Additional methods void setVirtualSiblings(const QList &siblings) { m_siblings = siblings; } - NSScreen *osScreen() const; + NSScreen *nsScreen() const; void updateGeometry(); public: - int m_screenIndex; + NSScreen *m_nsScreen; QRect m_geometry; QRect m_availableGeometry; QDpi m_logicalDpi; @@ -144,7 +144,7 @@ public: QList possibleKeys(const QKeyEvent *event) const Q_DECL_OVERRIDE; void updateScreens(); - QCocoaScreen *screenAtIndex(int index); + QCocoaScreen *screenForNSScreen(NSScreen *nsScreen); void setToolbar(QWindow *window, NSToolbar *toolbar); NSToolbar *toolbar(QWindow *window) const; -- cgit v1.2.3