From 1b37339e890f4ae23a1e33d76e84d3d32fd9ec01 Mon Sep 17 00:00:00 2001 From: Adam Kallai Date: Thu, 6 Mar 2014 06:02:09 -0800 Subject: Fix QOpenGLContext scene graph declaration in the QtQuick autotests Change-Id: Ia3e588bcdfd5c0dd094418fa77d5dc67b1e66b9c Reviewed-by: Jocelyn Turcotte --- tests/auto/quick/shared/qt_webengine_quicktest.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/quick/shared/qt_webengine_quicktest.h b/tests/auto/quick/shared/qt_webengine_quicktest.h index 80b7ca7a1..92e9889ef 100644 --- a/tests/auto/quick/shared/qt_webengine_quicktest.h +++ b/tests/auto/quick/shared/qt_webengine_quicktest.h @@ -72,10 +72,11 @@ QT_BEGIN_NAMESPACE qputenv("QTWEBENGINEPROCESS_PATH", QWP_PATH); \ if (!QCoreApplication::instance()) \ app = new Application(argc, argv); \ - QOpenGLContext shareContext; \ - shareContext.create(); \ - QSGContext::setSharedOpenGLContext(&shareContext); \ + QOpenGLContext *shareContext = new QOpenGLContext(); \ + shareContext->create(); \ + QSGContext::setSharedOpenGLContext(shareContext); \ int i = quick_test_main(argc, argv, #name, QUICK_TEST_SOURCE_DIR); \ + delete shareContext; \ delete app; \ return i; \ } -- cgit v1.2.3