summaryrefslogtreecommitdiffstats
path: root/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-02-08 10:57:34 (GMT)
committerGabriel de Dietrich <gabriel.dietrich-de@nokia.com>2011-02-08 10:57:34 (GMT)
commiteb7958c65b09569c2531d2c443a6d0fe0b507d97 (patch)
tree91544e4a4cf5c65b3acec7c219ebe63176a14994 /src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
parentef998bca70a799806c5754edfa49ea625881bc3e (diff)
parent44298c848ac254fe1942eb32eed7651dec5bf0e3 (diff)
downloadQt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.zip
Qt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.tar.gz
Qt-eb7958c65b09569c2531d2c443a6d0fe0b507d97.tar.bz2
Merge branch 'master-upstream'
Diffstat (limited to 'src/plugins/graphicssystems/meego/qmeegographicssystem.cpp')
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
index 20b092e..a70d232 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
@@ -42,6 +42,7 @@
#include <QDebug>
#include <private/qpixmap_raster_p.h>
#include <private/qwindowsurface_gl_p.h>
+#include <private/qwindowsurface_raster_p.h>
#include <private/qegl_p.h>
#include <private/qglextensions_p.h>
#include <private/qgl_p.h>
@@ -75,7 +76,12 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem()
QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const
{
- QGLShareContextScope ctx(qt_gl_share_widget()->context());
+ QGLWidget *shareWidget = qt_gl_share_widget();
+
+ if (!shareWidget)
+ return new QRasterWindowSurface(widget);
+
+ QGLShareContextScope ctx(shareWidget->context());
QMeeGoGraphicsSystem::surfaceWasCreated = true;
QWindowSurface *surface = new QGLWindowSurface(widget);