summaryrefslogtreecommitdiffstats
path: root/tests/auto/qgl
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-11-09 00:18:35 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-11-09 00:22:46 (GMT)
commitb48ae5932131b6d0934a50846cad441f6e9f5ccd (patch)
treef19b347fa1b74910f5ea9a027adea9486c0877e1 /tests/auto/qgl
parent18a3daf86118bd23a28f05fcf1721969c4ba491b (diff)
downloadQt-b48ae5932131b6d0934a50846cad441f6e9f5ccd.zip
Qt-b48ae5932131b6d0934a50846cad441f6e9f5ccd.tar.gz
Qt-b48ae5932131b6d0934a50846cad441f6e9f5ccd.tar.bz2
Set frameless window hints on QGL test windows under QWS
QWS combines the window title bar and the top-level widget into one window surface, which causes problems when the top-level widget is a QGLWidget: the raw GL surface contents are not the same as on other platforms where only the top-level widget contents are included in the window surface. This change sets Qt::FramelessWindowHint on QWS systems on widgets where we need to read back the top-level widget for comparison against a reference image. Reviewed-by: Sarah Smith
Diffstat (limited to 'tests/auto/qgl')
-rw-r--r--tests/auto/qgl/tst_qgl.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp
index 2c60eb2..6703d4e 100644
--- a/tests/auto/qgl/tst_qgl.cpp
+++ b/tests/auto/qgl/tst_qgl.cpp
@@ -805,6 +805,9 @@ void tst_QGL::graphicsViewClipping()
scene.addWidget(widget)->setPos(0, 0);
QGraphicsView view(&scene);
+#ifdef Q_WS_QWS
+ view.setWindowFlags(Qt::FramelessWindowHint);
+#endif
view.resize(2*size, 2*size);
QGLWidget *viewport = new QGLWidget;
@@ -949,6 +952,9 @@ public:
void tst_QGL::glWidgetRendering()
{
GLWidget w;
+#ifdef Q_WS_QWS
+ w.setWindowFlags(Qt::FramelessWindowHint);
+#endif
w.setGeometry(100, 100, 200, 200);
w.show();
@@ -1176,6 +1182,9 @@ void tst_QGL::glFBOUseInGLWidget()
QSKIP("QGLFramebufferObject not supported on this platform", SkipSingle);
FBOUseInGLWidget w;
+#ifdef Q_WS_QWS
+ w.setWindowFlags(Qt::FramelessWindowHint);
+#endif
w.resize(128, 128);
w.show();
@@ -1562,6 +1571,9 @@ protected:
void tst_QGL::replaceClipping()
{
ReplaceClippingGLWidget glw;
+#ifdef Q_WS_QWS
+ glw.setWindowFlags(Qt::FramelessWindowHint);
+#endif
glw.resize(300, 300);
glw.show();
@@ -1693,6 +1705,9 @@ protected:
void tst_QGL::clipTest()
{
ClipTestGLWidget glw;
+#ifdef Q_WS_QWS
+ glw.setWindowFlags(Qt::FramelessWindowHint);
+#endif
glw.resize(220, 220);
glw.show();