diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-09-16 13:49:26 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-09-16 14:52:40 +0200 |
commit | 8c6755aeec312ae771ef334fc863642514db3f7c (patch) | |
tree | 3ccec405ee35690bdb7def6c0a3c42866bd9adc2 /src/plugins | |
parent | 104debb6627d71f5540bb2c3347ce56dddc63594 (diff) | |
parent | c40a48af997f57caa0ecfca0b247837ba5b2f89b (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/corelib/tools/qstring.cpp
Change-Id: Ifc6cd3a0f1cf14cc0fe6cf30afb0c7f40cfdbc3e
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 9 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.h b/src/plugins/platforms/cocoa/qnsview.h index f75b3e35ca..ca2a15a1cc 100644 --- a/src/plugins/platforms/cocoa/qnsview.h +++ b/src/plugins/platforms/cocoa/qnsview.h @@ -70,7 +70,6 @@ QT_END_NAMESPACE Qt::KeyboardModifiers currentWheelModifiers; bool m_subscribesForGlobalFrameNotifications; QCocoaGLContext *m_glContext; - bool m_drawRectHasBeenCalled; bool m_shouldSetGLContextinDrawRect; } diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index ea8e1b363b..b8a31329fe 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -87,7 +87,6 @@ static QTouchDevice *touchDevice = 0; m_sendKeyEvent = false; m_subscribesForGlobalFrameNotifications = false; m_glContext = 0; - m_drawRectHasBeenCalled = false; m_shouldSetGLContextinDrawRect = false; currentCustomDragTypes = 0; m_sendUpAsRightButton = false; @@ -154,9 +153,9 @@ static QTouchDevice *touchDevice = 0; - (void) setQCocoaGLContext:(QCocoaGLContext *)context { m_glContext = context; - if (m_drawRectHasBeenCalled) { - [m_glContext->nsOpenGLContext() setView:self]; - } else { + [m_glContext->nsOpenGLContext() setView:self]; + if (![m_glContext->nsOpenGLContext() view]) { + //was unable to set view m_shouldSetGLContextinDrawRect = true; } @@ -393,8 +392,6 @@ static QTouchDevice *touchDevice = 0; m_shouldSetGLContextinDrawRect = false; } - m_drawRectHasBeenCalled = true; - if (!m_backingStore) return; |