summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qwindowsurface_gl.cpp')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index ff551427ec..4f00908b9d 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -178,6 +178,8 @@ QGLGraphicsSystem::QGLGraphicsSystem(bool useX11GL)
#endif
}
+static void qt_cleanup_gl_share_widget();
+
//
// QGLWindowSurface
//
@@ -185,6 +187,8 @@ class QGLGlobalShareWidget
{
public:
QGLGlobalShareWidget() : firstPixmap(0), widgetRefCount(0), widget(0), initializing(false) {
+ // ### FIXME - readd the post routine if the qApp is recreated
+ qAddPostRoutine(qt_cleanup_gl_share_widget);
created = true;
}
@@ -238,11 +242,7 @@ private:
bool QGLGlobalShareWidget::cleanedUp = false;
bool QGLGlobalShareWidget::created = false;
-static void qt_cleanup_gl_share_widget();
-Q_GLOBAL_STATIC_WITH_INITIALIZER(QGLGlobalShareWidget, _qt_gl_share_widget,
- {
- qAddPostRoutine(qt_cleanup_gl_share_widget);
- })
+Q_GLOBAL_STATIC(QGLGlobalShareWidget, _qt_gl_share_widget)
static void qt_cleanup_gl_share_widget()
{