summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-03-30 17:46:52 +0300
committerSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-04-04 14:13:03 +0000
commitcd8d2c17438eb1668eeaa244965a8b393fbbb655 (patch)
tree29204519471ae3680484eb0683d28132235df79b
parent08fc4c4e95d9e0a67eb9af71b282263d355e2532 (diff)
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 <simon.hausmann@qt.io>
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp10
1 files changed, 10 insertions, 0 deletions
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 <QtWidgets/QStackedWidget>
#include <QtTest/QtTest>
#include <QSignalSpy>
+#include <private/qguiapplication_p.h>
+#include <qpa/qplatformintegration.h>
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<QOpenGLWidget> w(new QOpenGLWidget);