Stabilized QPainterVideoSurface auto-test.
authorYoann Lopes <yoann.lopes@digia.com>
Tue, 17 Sep 2013 14:53:38 +0000 (16:53 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Tue, 17 Sep 2013 16:55:50 +0000 (18:55 +0200)
Change-Id: Idfd6f8396dce223be1c73ad56c6f7f66ca9d5d25
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
tests/auto/unit/qpaintervideosurface/tst_qpaintervideosurface.cpp

index 7671c7e..2f61527 100644 (file)
@@ -569,6 +569,8 @@ void tst_QPainterVideoSurface::shaderType()
 {
     QPainterVideoSurface surface;
     QGLWidget widget;
+    widget.show();
+    QTest::qWaitForWindowShown(&widget);
     widget.makeCurrent();
 
     QCOMPARE(surface.shaderType(), QPainterVideoSurface::NoShaders);
@@ -659,6 +661,8 @@ void tst_QPainterVideoSurface::shaderTypeStarted()
     QFETCH(QPainterVideoSurface::ShaderType, shaderType);
 
     QGLWidget widget;
+    widget.show();
+    QTest::qWaitForWindowShown(&widget);
     widget.makeCurrent();
 
     QPainterVideoSurface surface;
@@ -902,6 +906,8 @@ void tst_QPainterVideoSurface::shaderSupportedFormat()
     QFETCH(bool, supportedFormat);
 
     QGLWidget widget;
+    widget.show();
+    QTest::qWaitForWindowShown(&widget);
     widget.makeCurrent();
 
     QPainterVideoSurface surface;
@@ -1017,6 +1023,8 @@ void tst_QPainterVideoSurface::shaderPresent()
     QFETCH(int, bytesPerLineB);
 
     QGLWidget widget;
+    widget.show();
+    QTest::qWaitForWindowShown(&widget);
     widget.makeCurrent();
 
     QPainterVideoSurface surface;
@@ -1146,6 +1154,8 @@ void tst_QPainterVideoSurface::shaderPresentOpaqueFrame()
     QFETCH(QPainterVideoSurface::ShaderType, shaderType);
 
     QGLWidget widget;
+    widget.show();
+    QTest::qWaitForWindowShown(&widget);
     widget.makeCurrent();
 
     QPainterVideoSurface surface;
@@ -1193,6 +1203,8 @@ void tst_QPainterVideoSurface::shaderPresentGLFrame()
     QFETCH(QPainterVideoSurface::ShaderType, shaderType);
 
     QGLWidget widget;
+    widget.show();
+    QTest::qWaitForWindowShown(&widget);
     widget.makeCurrent();
 
     QPainterVideoSurface surface;