diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2012-01-19 12:51:43 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-02 17:20:24 +0100 |
commit | 75711510b1ad7d4ac4434ad41a0ed71cfc0344dc (patch) | |
tree | fc8fae2ea9c623d76cb670e3b9cda9a0e125f573 /tests/auto/gui/qopengl | |
parent | 6181676ca61f39f389a8c3ca293c369e7f80b1e8 (diff) |
Improve QSurface / QWindow API a bit and use that to avoid errors
Change-Id: Iadba1c3a7b8e6bc7f145455132cefed2a905c11d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tests/auto/gui/qopengl')
-rw-r--r-- | tests/auto/gui/qopengl/tst_qopengl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 0304376fb6..e8374b0cae 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -130,6 +130,7 @@ struct SharedResource : public QOpenGLSharedResource void tst_QOpenGL::sharedResourceCleanup() { QWindow window; + window.setSurfaceType(QWindow::OpenGLSurface); window.setGeometry(0, 0, 10, 10); window.create(); @@ -152,6 +153,7 @@ void tst_QOpenGL::sharedResourceCleanup() QOpenGLContext *ctx2 = new QOpenGLContext; ctx2->setShareContext(ctx); ctx2->create(); + delete ctx; resource->free(); @@ -191,6 +193,7 @@ void tst_QOpenGL::sharedResourceCleanup() void tst_QOpenGL::multiGroupSharedResourceCleanup() { QWindow window; + window.setSurfaceType(QWindow::OpenGLSurface); window.setGeometry(0, 0, 10, 10); window.create(); @@ -212,6 +215,7 @@ void tst_QOpenGL::multiGroupSharedResourceCleanup() void tst_QOpenGL::multiGroupSharedResourceCleanupCustom() { QWindow window; + window.setSurfaceType(QWindow::OpenGLSurface); window.setGeometry(0, 0, 10, 10); window.create(); @@ -348,6 +352,7 @@ void qt_opengl_check_test_pattern(const QImage& img) void tst_QOpenGL::fboSimpleRendering() { QWindow window; + window.setSurfaceType(QWindow::OpenGLSurface); window.setGeometry(0, 0, 10, 10); window.create(); QOpenGLContext ctx; @@ -391,6 +396,7 @@ void tst_QOpenGL::fboRendering() #endif QWindow window; + window.setSurfaceType(QWindow::OpenGLSurface); window.setGeometry(0, 0, 10, 10); window.create(); QOpenGLContext ctx; @@ -430,6 +436,7 @@ void tst_QOpenGL::fboRendering() void tst_QOpenGL::fboHandleNulledAfterContextDestroyed() { QWindow window; + window.setSurfaceType(QWindow::OpenGLSurface); window.setGeometry(0, 0, 10, 10); window.create(); @@ -459,6 +466,7 @@ void tst_QOpenGL::openGLPaintDevice() #endif QWindow window; + window.setSurfaceType(QWindow::OpenGLSurface); window.setGeometry(0, 0, 128, 128); window.create(); @@ -506,6 +514,7 @@ void tst_QOpenGL::openGLPaintDevice() void tst_QOpenGL::aboutToBeDestroyed() { QWindow window; + window.setSurfaceType(QWindow::OpenGLSurface); window.setGeometry(0, 0, 128, 128); window.create(); |