aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-07 01:01:54 +0100
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-02-07 01:01:55 +0100
commite04e5db13d2a1d03e4afe139fcc29e0ed5b1edab (patch)
treeca450c633cbce2c86293b302d6e448e652e0136b /tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
parent6a7c8749712c33e27cdbc93efdf54eddf8e7631f (diff)
parent895302829b46e00cde8eef13eb7c630af5d771e2 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-alpha1
Diffstat (limited to 'tests/auto/quick/qquickwindow/tst_qquickwindow.cpp')
-rw-r--r--tests/auto/quick/qquickwindow/tst_qquickwindow.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
index ab101dc1be..a862604fc1 100644
--- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
+++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp
@@ -2350,8 +2350,10 @@ void tst_qquickwindow::defaultSurfaceFormat()
// Depth and stencil should be >= what has been requested. For real. But use
// the context since the window's surface format is only partially updated
// on most platforms.
- QVERIFY(window.openglContext()->format().depthBufferSize() >= 16);
- QVERIFY(window.openglContext()->format().stencilBufferSize() >= 8);
+ const QOpenGLContext *openglContext = nullptr;
+ QTRY_VERIFY((openglContext = window.openglContext()) != nullptr);
+ QVERIFY(openglContext->format().depthBufferSize() >= 16);
+ QVERIFY(openglContext->format().stencilBufferSize() >= 8);
#endif
QSurfaceFormat::setDefaultFormat(savedDefaultFormat);
}