macOS: Fix NSOpenGLContext view association check

The expression "m_context.view = view" always evaluates to the view,
so the check was flawed.

Change-Id: Icef4ba5244975ccd78a151c7d40c53b2364c6148
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Tor Arne Vestbø 2018-10-22 16:29:29 +02:00 committed by Timur Pocheptsov
parent c053885735
commit ebfad73b4e

View File

@ -414,7 +414,8 @@ bool QCocoaGLContext::setDrawable(QPlatformSurface *surface)
// have the same effect as an update.
// Now we are ready to associate the view with the context
if ((m_context.view = view) != view) {
m_context.view = view;
if (m_context.view != view) {
qCInfo(lcQpaOpenGLContext) << "Failed to set" << view << "as drawable for" << m_context;
m_updateObservers.clear();
return false;