summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoaintegration.h
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2013-08-27 12:43:16 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-17 17:10:05 +0200
commit8f46cb3ade5a57506afcd1589e489bbcf38ca7f9 (patch)
tree44013dc654d5f4e5ab5ee2ef7497478ef2a9551d /src/plugins/platforms/cocoa/qcocoaintegration.h
parent5ee6c2490123ad9d742d007e68bd5a3dab2b3dfe (diff)
Keep Cocoa screen list in sync on screen connect.
The backtrace in QTBUG-33012 indicates that the screen list is getting out of sync on plugging/unplugging an external monitor. This happens on 10.9 only. Check if we are about to out of bounds access the screen list; call updateScreens() which will add the new screen. Task-number: QTBUG-33012 Change-Id: Id1acc3baca9e60e7f2a83188d66cdf9d322a582c Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoaintegration.h')
-rw-r--r--src/plugins/platforms/cocoa/qcocoaintegration.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.h b/src/plugins/platforms/cocoa/qcocoaintegration.h
index 7831888da1..8620ef4267 100644
--- a/src/plugins/platforms/cocoa/qcocoaintegration.h
+++ b/src/plugins/platforms/cocoa/qcocoaintegration.h
@@ -125,7 +125,7 @@ public:
QList<int> possibleKeys(const QKeyEvent *event) const;
void updateScreens();
- QCocoaScreen *screenAtIndex(int index) const { return mScreens.at(index); }
+ QCocoaScreen *screenAtIndex(int index);
private: