Revert recent attempt to fix Invalid Drawable error on Mac.

This reverts commit 59fd36bb914cae248d3c5100dd734d6d90a58dca,
which caused other drawing problems.

Change-Id: I3bb75fd3ca1cd21ffbb9ef5474266f4cd615a64a
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
Chris Meyer 2013-09-13 00:43:07 +02:00 committed by The Qt Project
parent 44a58de2ae
commit e19e1aae69
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 {
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;