diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 4cc2dc49027..36ff1d1f2e9 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -492,7 +492,7 @@ void tst_QOpenGL::fboTextureOwnership() QOpenGLFramebufferObjectFormat fboFormat; fboFormat.setAttachment(QOpenGLFramebufferObject::NoAttachment); - QOpenGLFramebufferObject *fbo = new QOpenGLFramebufferObject(200, 100, fboFormat); + const auto fbo = std::make_unique(200, 100, fboFormat); QVERIFY(fbo->texture() != 0); fbo->bind(); @@ -516,7 +516,6 @@ void tst_QOpenGL::fboTextureOwnership() QFUZZY_COMPARE_IMAGES(fb, reference); ctx.functions()->glDeleteTextures(1, &texture); - delete fbo; } void tst_QOpenGL::fboRendering_data()