summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-10-22 16:39:14 +0200
committerPrasanth Ullattil <prasanth.ullattil@nokia.com>2009-10-23 13:25:13 +0200
commit3481db791c3b48e28f1a9531b247adf6562edb71 (patch)
tree201d9160ad1e31bc0986778345b3390474d0f967 /src/opengl
parent19c60da9c15dc609d6d07c687a59d9c2c1a4da13 (diff)
Remove internal widgets from QApplication::topLevelWidgets()
We have some internal hidden widgets which should not come up in the QApplication::topLevelWidgets() list. So the known ones are being removed from the QWidgetPrivate::allWidgets set. Task-number: QTBUG-739 Reviewed-by: Denis Dzyubenko Reviewed-by: Bradley T. Hughes
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qwindowsurface_gl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 4547416836..dcbf021bf3 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -49,12 +49,12 @@
#include <qglpixelbuffer.h>
#include <qcolormap.h>
#include <qdesktopwidget.h>
+#include <private/qwidget_p.h>
#include "qdebug.h"
#ifdef Q_WS_X11
#include <private/qt_x11_p.h>
#include <qx11info_x11.h>
-#include <private/qwidget_p.h>
#ifndef QT_OPENGL_ES
#include <GL/glx.h>
@@ -195,6 +195,9 @@ public:
if (!initializing && !widget && !cleanedUp) {
initializing = true;
widget = new QGLWidget;
+ // We dont need this internal widget to appear in QApplication::topLevelWidgets()
+ if (QWidgetPrivate::allWidgets)
+ QWidgetPrivate::allWidgets->remove(widget);
initializing = false;
}
return widget;