Fixed hellowindow making context current in wrong thread.

Make the context a child of the Renderer, which is already moved to the
correct thread.

Change-Id: Iafda090e15b322c03e2c10b1905050f636b90197
Reviewed-on: http://codereview.qt.nokia.com/3915
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
This commit is contained in:
Samuel Rødal 2011-08-31 09:14:00 +02:00 committed by Gunnar Sletta
parent df0ff8fd4e
commit a7d682dd9c

View File

@ -10,7 +10,7 @@ Renderer::Renderer(const QSurfaceFormat &format, Renderer *share)
: m_initialized(false)
, m_format(format)
{
m_context = new QOpenGLContext;
m_context = new QOpenGLContext(this);
m_context->setFormat(format);
if (share)
m_context->setShareContext(share->m_context);