diff options
Diffstat (limited to 'tests/auto/quick/nodes/tst_nodestest.cpp')
-rw-r--r-- | tests/auto/quick/nodes/tst_nodestest.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/quick/nodes/tst_nodestest.cpp b/tests/auto/quick/nodes/tst_nodestest.cpp index 63e0aeb324..e7303604b4 100644 --- a/tests/auto/quick/nodes/tst_nodestest.cpp +++ b/tests/auto/quick/nodes/tst_nodestest.cpp @@ -41,6 +41,9 @@ #include <QtQuick/qsgsimpletexturenode.h> #include <QtQuick/private/qsgtexture_p.h> +#include <QtGui/private/qguiapplication_p.h> +#include <QtGui/qpa/qplatformintegration.h> + QT_BEGIN_NAMESPACE inline bool operator==(const QSGGeometry::TexturedPoint2D& l, const QSGGeometry::TexturedPoint2D& r) { @@ -80,6 +83,9 @@ private: void NodesTest::initTestCase() { + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + QSKIP("OpenGL not supported by the platform"); + QSGRenderLoop *renderLoop = QSGRenderLoop::instance(); surface = new QOffscreenSurface; @@ -141,9 +147,9 @@ public: int DummyRenderer::globalRendereringOrder; NodesTest::NodesTest() - : surface(Q_NULLPTR) - , context(Q_NULLPTR) - , renderContext(Q_NULLPTR) + : surface(nullptr) + , context(nullptr) + , renderContext(nullptr) { } |