diff options
author | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-10-22 14:39:14 (GMT) |
---|---|---|
committer | Prasanth Ullattil <prasanth.ullattil@nokia.com> | 2009-10-23 11:25:13 (GMT) |
commit | 3481db791c3b48e28f1a9531b247adf6562edb71 (patch) | |
tree | 201d9160ad1e31bc0986778345b3390474d0f967 /src/opengl | |
parent | 19c60da9c15dc609d6d07c687a59d9c2c1a4da13 (diff) | |
download | Qt-3481db791c3b48e28f1a9531b247adf6562edb71.zip Qt-3481db791c3b48e28f1a9531b247adf6562edb71.tar.gz Qt-3481db791c3b48e28f1a9531b247adf6562edb71.tar.bz2 |
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.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 4547416..dcbf021 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; |