Revert "Fix Invalid Drawable error when using createWindowContainer on Mac."

This reverts commit 04325bdd26.

This change breaks qtdeclarative on Mac.

Change-Id: I77b121cc6b283cf7498e93e4b914d2fb68808ab6
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
Gunnar Sletta 2013-09-19 12:55:11 +02:00 committed by The Qt Project
parent 13c03d3c28
commit 85708e7377
2 changed files with 3 additions and 7 deletions

View File

@ -70,7 +70,6 @@ QT_END_NAMESPACE
Qt::KeyboardModifiers currentWheelModifiers;
bool m_subscribesForGlobalFrameNotifications;
QCocoaGLContext *m_glContext;
bool m_drawRectHasBeenCalled;
bool m_shouldSetGLContextinDrawRect;
}

View File

@ -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;