diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-03-26 12:21:25 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-31 18:36:46 +0200 |
commit | 3d6d6594b0dd2a8860b8fddd5a58f86c4ebd255c (patch) | |
tree | 5a9959d433425d8ff1a1d78d1b2506a1fd147770 /tests/auto/quick/shared/qt_webengine_quicktest.h | |
parent | 3512a6cfe07cb7108485b3e39d586612aa5ed3d8 (diff) |
Centralize OpenGL initialization
We now require the user to use QWebEngine::initialize() in main (preferably) and
print out an error message if this wasn't set up accordingly. This limits the use
of private scene graph API to inside QWebEngine and offers public API for users
of the API.
Change-Id: I787c176a85ab7784dbc8787d9876960b4872959e
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'tests/auto/quick/shared/qt_webengine_quicktest.h')
-rw-r--r-- | tests/auto/quick/shared/qt_webengine_quicktest.h | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/quick/shared/qt_webengine_quicktest.h b/tests/auto/quick/shared/qt_webengine_quicktest.h index 92e9889ef..275e40dd2 100644 --- a/tests/auto/quick/shared/qt_webengine_quicktest.h +++ b/tests/auto/quick/shared/qt_webengine_quicktest.h @@ -51,7 +51,7 @@ #endif #include "qopenglcontext.h" -#include <QtQuick/private/qsgcontext_p.h> +#include <qtwebengineglobal.h> QT_BEGIN_NAMESPACE @@ -72,11 +72,8 @@ QT_BEGIN_NAMESPACE qputenv("QTWEBENGINEPROCESS_PATH", QWP_PATH); \ if (!QCoreApplication::instance()) \ app = new Application(argc, argv); \ - QOpenGLContext *shareContext = new QOpenGLContext(); \ - shareContext->create(); \ - QSGContext::setSharedOpenGLContext(shareContext); \ + QWebEngine::initialize(); \ int i = quick_test_main(argc, argv, #name, QUICK_TEST_SOURCE_DIR); \ - delete shareContext; \ delete app; \ return i; \ } |