diff options
Diffstat (limited to 'tests/auto/gui/kernel/qopenglwindow')
-rw-r--r-- | tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp index b130210447..58dee6f6ca 100644 --- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp +++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp @@ -31,12 +31,15 @@ #include <QtGui/QOpenGLFunctions> #include <QtGui/QOpenGLContext> #include <QtGui/QPainter> +#include <private/qguiapplication_p.h> +#include <qpa/qplatformintegration.h> class tst_QOpenGLWindow : public QObject { Q_OBJECT private slots: + void initTestCase(); void create(); void basic(); void painter(); @@ -45,6 +48,12 @@ private slots: void underOver(); }; +void tst_QOpenGLWindow::initTestCase() +{ + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + QSKIP("OpenGL is not supported on this platform."); +} + void tst_QOpenGLWindow::create() { QOpenGLWindow w; |