summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-06-12 12:01:25 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-06-12 12:41:52 (GMT)
commit8a2993a6c53e1a5641bd1c500ad4bd54e799299b (patch)
treed9b4fb4e6525ac7fb166c99350e780cac86dd678 /src/opengl/qwindowsurface_gl_p.h
parent0265a36425cfcb01d7c35fbb4a7c5907893972a1 (diff)
downloadQt-8a2993a6c53e1a5641bd1c500ad4bd54e799299b.zip
Qt-8a2993a6c53e1a5641bd1c500ad4bd54e799299b.tar.gz
Qt-8a2993a6c53e1a5641bd1c500ad4bd54e799299b.tar.bz2
Made QPixmap autotest pass with -graphicssystem opengl
The window surface has been modified to track widget deletion to make sure it doesn't try to access the widget's context data after deletion. QGLPixmapData now also uses GL_RGB instead of GL_RGBA when appropriate, and hasAlphaChannel() has been modified in view of this. A number of other issues have been fixed in QGLPixmapData, and the autotest has been modified to use a more lenient pixmap compare function due to off-by-one pixel errors here and there. Reviewed-by: Trond
Diffstat (limited to 'src/opengl/qwindowsurface_gl_p.h')
-rw-r--r--src/opengl/qwindowsurface_gl_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h
index d47e3e3..9efd1ae 100644
--- a/src/opengl/qwindowsurface_gl_p.h
+++ b/src/opengl/qwindowsurface_gl_p.h
@@ -65,8 +65,9 @@ class QRegion;
class QWidget;
struct QGLWindowSurfacePrivate;
-class QGLWindowSurface : public QWindowSurface, public QPaintDevice
+class QGLWindowSurface : public QObject, public QWindowSurface, public QPaintDevice
{
+ Q_OBJECT
public:
QGLWindowSurface(QWidget *window);
~QGLWindowSurface();
@@ -91,6 +92,9 @@ public:
protected:
int metric(PaintDeviceMetric metric) const;
+private slots:
+ void deleted(QObject *object);
+
private:
void hijackWindow(QWidget *widget);