diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-11-09 00:18:35 (GMT) |
---|---|---|
committer | Jason McDonald <jason.mcdonald@nokia.com> | 2009-11-17 06:00:51 (GMT) |
commit | 6eaf79b0f43a501b3459da39e64ff4a8cdc7cbf8 (patch) | |
tree | a829080cd43224f6900ed0b90ed607eb716b7fa9 | |
parent | 2dce28261aaccff87ef25381dd66060738e31507 (diff) | |
download | Qt-6eaf79b0f43a501b3459da39e64ff4a8cdc7cbf8.zip Qt-6eaf79b0f43a501b3459da39e64ff4a8cdc7cbf8.tar.gz Qt-6eaf79b0f43a501b3459da39e64ff4a8cdc7cbf8.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
(cherry picked from commit b48ae5932131b6d0934a50846cad441f6e9f5ccd)
-rw-r--r-- | tests/auto/qgl/tst_qgl.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/auto/qgl/tst_qgl.cpp b/tests/auto/qgl/tst_qgl.cpp index aed5467..5fb27ba 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(); |