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>bb10
parent
08fc4c4e95
commit
cd8d2c1743
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue