summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick
diff options
context:
space:
mode:
authorAdam Kallai <kadam@inf.u-szeged.hu>2014-03-06 06:02:09 -0800
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-10 11:46:00 +0100
commit1b37339e890f4ae23a1e33d76e84d3d32fd9ec01 (patch)
tree226db2e215ffc8e8c71bf5281132ccc5bf2742fc /tests/auto/quick
parentc845b8438b65e6735c8beb0927ad0527cb1b0611 (diff)
Fix QOpenGLContext scene graph declaration in the QtQuick autotests
Change-Id: Ia3e588bcdfd5c0dd094418fa77d5dc67b1e66b9c Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'tests/auto/quick')
-rw-r--r--tests/auto/quick/shared/qt_webengine_quicktest.h7
1 files changed, 4 insertions, 3 deletions
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; \
}