From cd8d2c17438eb1668eeaa244965a8b393fbbb655 Mon Sep 17 00:00:00 2001 From: Sami Nurmenniemi Date: Thu, 30 Mar 2017 17:46:52 +0300 Subject: Skip testing of QOpenGLWidget on platforms that don't support it QOpenGLWidget is not supported on all platforms. Skip tests on those. Change-Id: I0f9500553427903f20d248acaa20803276e3ab00 Reviewed-by: Simon Hausmann --- tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/auto/widgets/widgets') diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp index f13291d0a9..5980cb95d0 100644 --- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp +++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp @@ -39,12 +39,15 @@ #include #include #include +#include +#include class tst_QOpenGLWidget : public QObject { Q_OBJECT private slots: + void initTestCase(); void create(); void clearAndGrab(); void clearAndResizeAndGrab(); @@ -60,6 +63,13 @@ private slots: void stackWidgetOpaqueChildIsVisible(); }; +void tst_QOpenGLWidget::initTestCase() +{ + // See QOpenGLWidget constructor + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::RasterGLSurface)) + QSKIP("QOpenGLWidget is not supported on this platform."); +} + void tst_QOpenGLWidget::create() { QScopedPointer w(new QOpenGLWidget); -- cgit v1.2.3