Fixed hellowindow making context current in wrong thread.
authorSamuel Rødal <samuel.rodal@nokia.com>
Wed, 31 Aug 2011 07:14:00 +0000 (09:14 +0200)
committerGunnar Sletta <gunnar.sletta@nokia.com>
Wed, 31 Aug 2011 07:26:48 +0000 (09:26 +0200)
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>
examples/opengl/hellowindow/hellowindow.cpp

index cc1f52a..10d9d34 100644 (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);