diff options
Diffstat (limited to 'lib/content_browser_client_qt.cpp')
-rw-r--r-- | lib/content_browser_client_qt.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/content_browser_client_qt.cpp b/lib/content_browser_client_qt.cpp index 68f0523cd..9bc9bfe5e 100644 --- a/lib/content_browser_client_qt.cpp +++ b/lib/content_browser_client_qt.cpp @@ -59,7 +59,9 @@ #include "web_contents_view_qt.h" #include <QGuiApplication> +#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)) #include <QtQuick/private/qsgcontext_p.h> +#endif #include <qpa/qplatformnativeinterface.h> namespace { @@ -254,10 +256,12 @@ private: void ShareGroupQtQuick::AboutToAddFirstContext() { +#if (QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)) // This currently has to be setup by ::main in all applications using QQuickWebEngineView with delegated rendering. QOpenGLContext *shareContext = QSGContext::sharedOpenGLContext(); Q_ASSERT(shareContext); m_shareContextQtQuick = make_scoped_refptr(new QtShareGLContext(shareContext)); +#endif } content::WebContentsViewPort* ContentBrowserClientQt::OverrideCreateWebContentsView(content::WebContents* web_contents, |