summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Dominic K <mdk@codethink.co.uk>2011-01-04 09:28:20 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-01-04 09:28:20 (GMT)
commit3ad35ffdbfcbd2db5e8aac95fa0cc9f80e372128 (patch)
tree2780ab0ca741a53727fa188f07eef35e983507b9 /src
parent7fec0ddfae9e7c79d904c87e7726991a306f5ab3 (diff)
downloadQt-3ad35ffdbfcbd2db5e8aac95fa0cc9f80e372128.zip
Qt-3ad35ffdbfcbd2db5e8aac95fa0cc9f80e372128.tar.gz
Qt-3ad35ffdbfcbd2db5e8aac95fa0cc9f80e372128.tar.bz2
Pre-create the GL share widget before window surface creation.
Not pixmap creation. Merge-request: 988 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
index 4a86082..b1a8f5f7 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
@@ -75,6 +75,8 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem()
QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const
{
+ QGLShareContextScope ctx(qt_gl_share_widget()->context());
+
QMeeGoGraphicsSystem::surfaceWasCreated = true;
QWindowSurface *surface = new QGLWindowSurface(widget);
return surface;
@@ -82,12 +84,6 @@ QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const
QPixmapData *QMeeGoGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const
{
- // Long story short: without this it's possible to hit an
- // uninitialized paintDevice due to a Qt bug too complex to even
- // explain here... not to mention fix without going crazy.
- // MDK
- QGLShareContextScope ctx(qt_gl_share_widget()->context());
-
return new QRasterPixmapData(type);
}