diff options
4 files changed, 20 insertions, 5 deletions
diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h index 39c972f4b..1e50c8f08 100644 --- a/src/core/render_widget_host_view_qt_delegate.h +++ b/src/core/render_widget_host_view_qt_delegate.h @@ -51,6 +51,7 @@ class QEvent; class QPainter; class QSGLayer; class QSGNode; +class QSGRectangleNode; class QSGTexture; class QVariant; class QWindow; @@ -61,11 +62,8 @@ class QSGImageNode; typedef QSGImageNode QSGInternalImageNode; class QSGSimpleTextureNode; typedef QSGSimpleTextureNode QSGTextureNode; -class QSGSimpleRectNode; -typedef QSGSimpleRectNode QSGRectangleNode; #else class QSGInternalImageNode; -class QSGRectangleNode; class QSGImageNode; typedef QSGImageNode QSGTextureNode; #endif diff --git a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp index c17c6da06..e9b8dea44 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -206,7 +206,8 @@ QSGRectangleNode *RenderWidgetHostViewQtDelegateQuick::createRectangleNode() #if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) return QQuickItem::window()->createRectangleNode(); #else - return new QSGSimpleRectNode(); + QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context; + return renderContext->sceneGraphContext()->createRectangleNode(); #endif } diff --git a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp index c7b825854..9b5d90146 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -259,7 +259,8 @@ QSGRectangleNode *RenderWidgetHostViewQtDelegateWidget::createRectangleNode() #if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) return quickWindow()->createRectangleNode(); #else - return new QSGSimpleRectNode(); + QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context; + return renderContext->sceneGraphContext()->createRectangleNode(); #endif } diff --git a/tools/qmake/mkspecs/features/functions.prf b/tools/qmake/mkspecs/features/functions.prf index 590d521e8..f6d4f676b 100644 --- a/tools/qmake/mkspecs/features/functions.prf +++ b/tools/qmake/mkspecs/features/functions.prf @@ -1,3 +1,18 @@ +defineTest(isQtMinimum) { + !equals(QT_MAJOR_VERSION, $$1): return(false) + count(ARGS, 1, greaterThan) { + lessThan(QT_MINOR_VERSION, $$2): return(false) + } + return(true) +} + +!isQtMinimum(5, 8) { + defineTest(qtConfig) { + contains(QT_CONFIG, $$1): return(true) + return(false) + } +} + defineTest(isPlatformSupported) { linux { !gcc:!clang { |