summaryrefslogtreecommitdiffstats
path: root/src/core/content_browser_client_qt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/content_browser_client_qt.cpp')
-rw-r--r--src/core/content_browser_client_qt.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/content_browser_client_qt.cpp b/src/core/content_browser_client_qt.cpp
index 259392ca8..e8fc3adda 100644
--- a/src/core/content_browser_client_qt.cpp
+++ b/src/core/content_browser_client_qt.cpp
@@ -62,9 +62,13 @@
#include "web_contents_view_qt.h"
#include <QGuiApplication>
-#include <QtGui/private/qopenglcontext_p.h>
+#include <QOpenGLContext>
#include <qpa/qplatformnativeinterface.h>
+QT_BEGIN_NAMESPACE
+Q_GUI_EXPORT QOpenGLContext *qt_gl_global_share_context();
+QT_END_NAMESPACE
+
namespace {
ContentBrowserClientQt* gBrowserClient = 0; // Owned by ContentMainDelegateQt.
@@ -261,7 +265,7 @@ private:
void ShareGroupQtQuick::AboutToAddFirstContext()
{
// This currently has to be setup by ::main in all applications using QQuickWebEngineView with delegated rendering.
- QOpenGLContext *shareContext = QOpenGLContextPrivate::globalShareContext();
+ QOpenGLContext *shareContext = qt_gl_global_share_context();
if (!shareContext) {
qFatal("QWebEngine: OpenGL resource sharing is not set up in QtQuick. Please make sure to call QtWebEngine::initialize() in your main() function.");
}