aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp')
-rw-r--r--tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
index eb720e5109..d46258889f 100644
--- a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
+++ b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp
@@ -62,6 +62,7 @@ public:
}
private slots:
+ void initTestCase() Q_DECL_OVERRIDE;
void layerEnabled();
void layerSmooth();
void layerMipmap();
@@ -92,14 +93,20 @@ private:
};
tst_QQuickItemLayer::tst_QQuickItemLayer()
- : m_mesaVersion(0)
+ : m_isMesaSoftwareRasterizer(false)
+ , m_mesaVersion(0)
{
+}
+
+void tst_QQuickItemLayer::initTestCase()
+{
+ QQmlDataTest::initTestCase();
QWindow window;
QOpenGLContext context;
window.setSurfaceType(QWindow::OpenGLSurface);
window.create();
- context.create();
- context.makeCurrent(&window);
+ QVERIFY(context.create());
+ QVERIFY(context.makeCurrent(&window));
const char *vendor = (const char *)context.functions()->glGetString(GL_VENDOR);
const char *renderer = (const char *)context.functions()->glGetString(GL_RENDERER);
m_isMesaSoftwareRasterizer = strcmp(vendor, "Mesa Project") == 0