summaryrefslogtreecommitdiffstats
path: root/tests/auto/opengl/qgl/tst_qgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/opengl/qgl/tst_qgl.cpp')
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 6c5c90d737..d4d109b981 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -832,10 +832,19 @@ static void fuzzyCompareImages(const QImage &testImage, const QImage &referenceI
class UnclippedWidget : public QWidget
{
public:
+ bool painted;
+
+ UnclippedWidget()
+ : painted(false)
+ {
+ }
+
void paintEvent(QPaintEvent *)
{
QPainter p(this);
p.fillRect(rect().adjusted(-1000, -1000, 1000, 1000), Qt::black);
+
+ painted = true;
}
};
@@ -865,7 +874,9 @@ void tst_QGL::graphicsViewClipping()
scene.setSceneRect(view.viewport()->rect());
- QVERIFY(QTest::qWaitForWindowActive(&view));
+ QTest::qWaitForWindowExposed(&view);
+
+ QTRY_VERIFY(widget->painted);
QImage image = viewport->grabFrameBuffer();
QImage expected = image;