diff options
-rw-r--r-- | tests/auto/quick/qquickframebufferobject/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickframebufferobject/CMakeLists.txt b/tests/auto/quick/qquickframebufferobject/CMakeLists.txt index 9d87a5703d..7bac1eeb2f 100644 --- a/tests/auto/quick/qquickframebufferobject/CMakeLists.txt +++ b/tests/auto/quick/qquickframebufferobject/CMakeLists.txt @@ -24,6 +24,7 @@ qt_internal_add_test(tst_qquickframebufferobject tst_qquickframebufferobject.cpp LIBRARIES Qt::Gui + Qt::GuiPrivate Qt::Quick Qt::QuickTestUtilsPrivate TESTDATA ${test_data} diff --git a/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp b/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp index ffd6478f9c..7741401b5a 100644 --- a/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp +++ b/tests/auto/quick/qquickframebufferobject/tst_qquickframebufferobject.cpp @@ -10,6 +10,9 @@ #include <qopenglframebufferobject.h> #include <qopenglfunctions.h> +#include <qpa/qplatformintegration.h> +#include <private/qguiapplication_p.h> + #include <QtQuick/QQuickFramebufferObject> #include <QtQuickTestUtils/private/qmlutils_p.h> @@ -136,6 +139,9 @@ tst_QQuickFramebufferObject::tst_QQuickFramebufferObject() void tst_QQuickFramebufferObject::initTestCase() { + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) + QSKIP("OpenGL is not enabled in this configuration"); + QQmlDataTest::initTestCase(); QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGLRhi); } |