diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index 87e43733d9c2a34e86d45674235bc42582b3da35..002a0375a3699e26ce396f18b35d1640e27952a0 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -20,50 +20,42 @@ defineTest(runConfigure) { qtCompileTest($$test) } - isQtMinimum(5, 8) { - include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) - QT_FOR_CONFIG += webengine-private + include($$QTWEBENGINE_OUT_ROOT/qtwebengine-config.pri) + QT_FOR_CONFIG += webengine-private - !qtConfig(gperf) { - skipBuild("Required gperf could not be found.") - return(false) - } - !qtConfig(bison) { - skipBuild("Required bison could not be found.") - return(false) - } - !qtConfig(flex) { - skipBuild("Required flex could not be found.") - return(false) - } - !qtConfig(python2) { - skipBuild("A suitable version of python2 could not be found.") - return(false) - } - - qtConfig(pepper-plugins): WEBENGINE_CONFIG += use_pepper_plugins - qtConfig(printing-and-pdf): WEBENGINE_CONFIG += use_printing use_pdf - qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs - qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker - qtConfig(webrtc): WEBENGINE_CONFIG += use_webrtc - qtConfig(embedded): WEBENGINE_CONFIG += embedded_build - qtConfig(system-webp): WEBENGINE_CONFIG += use_system_libwebp - qtConfig(system-opus): WEBENGINE_CONFIG += use_system_opus - qtConfig(system-ffmpeg): WEBENGINE_CONFIG += use_system_ffmpeg - qtConfig(system-icu): WEBENGINE_CONFIG += use_system_icu - qtConfig(nss-certificate-handling): WEBENGINE_CONFIG += use_nss - !contains(WEBENGINE_CONFIG, use_system_libwebp): WEBENGINE_CONFIG += use_bundled_libwebp - !contains(WEBENGINE_CONFIG, use_system_opus): WEBENGINE_CONFIG += use_bundled_opus - !contains(WEBENGINE_CONFIG, use_system_ffmpeg): WEBENGINE_CONFIG += use_bundled_ffmpeg - !contains(WEBENGINE_CONFIG, use_system_icu): WEBENGINE_CONFIG += use_bundled_icu - } else { - # Feature defaults when building with Qt 5.6 LTS: - cross_compile { - WEBENGINE_CONFIG += embedded_build reduce_binary_size - } else { - WEBENGINE_CONFIG += use_spellchecker use_webrtc use_pepper_plugins use_printing use_pdf - } + !qtConfig(gperf) { + skipBuild("Required gperf could not be found.") + return(false) } + !qtConfig(bison) { + skipBuild("Required bison could not be found.") + return(false) + } + !qtConfig(flex) { + skipBuild("Required flex could not be found.") + return(false) + } + !qtConfig(python2) { + skipBuild("A suitable version of python2 could not be found.") + return(false) + } + + qtConfig(pepper-plugins): WEBENGINE_CONFIG += use_pepper_plugins + qtConfig(printing-and-pdf): WEBENGINE_CONFIG += use_printing use_pdf + qtConfig(proprietary-codecs): WEBENGINE_CONFIG += use_proprietary_codecs + qtConfig(spellchecker): WEBENGINE_CONFIG += use_spellchecker + qtConfig(webrtc): WEBENGINE_CONFIG += use_webrtc + qtConfig(embedded): WEBENGINE_CONFIG += embedded_build + qtConfig(system-webp): WEBENGINE_CONFIG += use_system_libwebp + qtConfig(system-opus): WEBENGINE_CONFIG += use_system_opus + qtConfig(system-ffmpeg): WEBENGINE_CONFIG += use_system_ffmpeg + qtConfig(system-icu): WEBENGINE_CONFIG += use_system_icu + qtConfig(nss-certificate-handling): WEBENGINE_CONFIG += use_nss + !contains(WEBENGINE_CONFIG, use_system_libwebp): WEBENGINE_CONFIG += use_bundled_libwebp + !contains(WEBENGINE_CONFIG, use_system_opus): WEBENGINE_CONFIG += use_bundled_opus + !contains(WEBENGINE_CONFIG, use_system_ffmpeg): WEBENGINE_CONFIG += use_bundled_ffmpeg + !contains(WEBENGINE_CONFIG, use_system_icu): WEBENGINE_CONFIG += use_bundled_icu + isQtMinimum(5, 9) { qtConfig(appstore-compliant): WEBENGINE_CONFIG += use_appstore_compliant_code optimize_size: WEBENGINE_CONFIG += reduce_binary_size @@ -92,12 +84,6 @@ defineTest(runConfigure) { } packagesExist(minizip, zlib): WEBENGINE_CONFIG += use_system_minizip use_system_zlib else: log("System zlib or minizip not found. Using Chromium's copies.$${EOL}") - !isQtMinimum(5, 8) { - packagesExist(libwebp,libwebpdemux): WEBENGINE_CONFIG += use_system_libwebp use_system_libwebpdemux - else: log("System libwebp or libwebpdemux not found. Using Chromium's copies.$${EOL}") - packagesExist(opus): WEBENGINE_CONFIG += use_system_opus - else: log("System opus not found. Using Chromium's copy.$${EOL}") - } packagesExist(libxml-2.0,libxslt) { PKGCONFIG_LIBS_STATIC = $$system($$PKG_CONFIG --libs --static libxml-2.0) contains(PKGCONFIG_LIBS_STATIC, -licuuc) { @@ -152,35 +138,6 @@ defineTest(runConfigure) { unix:!darwin { log("System library dependencies:$${EOL}") - !isQtMinimum(5, 8) { - use?(system_icu) { - packagesExist("\'icu-uc >= 53\', \'icu-i18n >= 53\'") { - log(" ICU ................................ Using system version$${EOL}") - } else { - log(" ICU ................................ System ICU not found$${EOL}") - skipBuild("Unmet dependencies: icu-uc, icu-i18n") - } - } else { - log(" ICU ................................ Using internal copy (Default, force system ICU with WEBENGINE_CONFIG+=use_system_icu)$${EOL}") - WEBENGINE_CONFIG += use_bundled_icu - } - use?(system_ffmpeg) { - packagesExist("libavcodec libavformat libavutil") { - packagesExist("libwebp, libwebpdemux, opus, \'vpx >= 1.4\'"){ - log(" FFMPEG ............................. Using system version$${EOL}") - } else { - log(" FFMPEG ............................. Conflicting FFMPEG dependencies$${EOL}") - skipBuild("Unmet dependencies: opus, vpx, libwebp, libwebpdemux") - } - } else { - log(" FFMPEG ............................. System FFMPEG not found$${EOL}") - skipBuild("Unmet dependencies: libavcodec, libavformat, libavutil") - } - } else { - log(" FFMPEG ............................. Using internal copy (Default, force system FFMPEG with WEBENGINE_CONFIG+=use_system_ffmpeg)$${EOL}") - WEBENGINE_CONFIG += use_bundled_ffmpeg - } - } for(config, WEBENGINE_CONFIG) { match = $$find(config, "^use_system_") !isEmpty(match) { diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp index 072f2796765c25c4516ecdaf2f0602f28559ebe1..0353dac7d6ac1b07bcd6cbcef897d0cedf5fabbb 100644 --- a/src/core/api/qtwebenginecoreglobal.cpp +++ b/src/core/api/qtwebenginecoreglobal.cpp @@ -85,11 +85,9 @@ QWEBENGINE_PRIVATE_EXPORT void initialize() return; } -#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 1)) // Bail out silently if the user did not construct a QGuiApplication. if (!qobject_cast<QGuiApplication *>(app)) return; -#endif if (app->thread() != QThread::currentThread()) { qFatal("QtWebEngine::initialize() must be called from the Qt gui thread."); diff --git a/src/core/api/qwebenginecallback.h b/src/core/api/qwebenginecallback.h index b967f926ab6b84c3f8c0ef9feded549b1aee7d58..b981b2afb22b4865dd27a5848138ed56f39eeed2 100644 --- a/src/core/api/qwebenginecallback.h +++ b/src/core/api/qwebenginecallback.h @@ -92,11 +92,9 @@ private: Q_DECLARE_SHARED(QWebEngineCallback<int>) Q_DECLARE_SHARED(QWebEngineCallback<const QByteArray &>) -#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QWebEngineCallback<bool>) Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QWebEngineCallback<const QString &>) Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QWebEngineCallback<const QVariant &>) -#endif QT_END_NAMESPACE diff --git a/src/core/api/qwebenginecallback_p.h b/src/core/api/qwebenginecallback_p.h index b88ef4d2c002ad41f741fa4197240c61bb636e34..fdaf84d21a98736861bdcf06be4ce27a1b5d38c5 100644 --- a/src/core/api/qwebenginecallback_p.h +++ b/src/core/api/qwebenginecallback_p.h @@ -242,12 +242,10 @@ void CallbackDirectory::CallbackSharedDataPointer<T>::invokeEmpty() parent->invokeEmptyInternal(callback); } -#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) #define CHECK_RELOCATABLE(x) \ Q_STATIC_ASSERT((QTypeInfoQuery<QWebEngineCallback< x > >::isRelocatable)); FOR_EACH_TYPE(CHECK_RELOCATABLE) #undef CHECK_RELOCATABLE -#endif } // namespace QtWebEngineCore diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index 9a4d1ba9113573db351d82077b9122ba22bf55ec..5d635374045fd64e76240f6d181a2f88bb693d71 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -82,13 +82,8 @@ #include <QSGTexture> #include <private/qsgadaptationlayer_p.h> -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) #include <QSGImageNode> #include <QSGRectangleNode> -#else -#include <QSGSimpleRectNode> -#include <QSGSimpleTextureNode> -#endif #if !defined(QT_NO_EGL) #include <EGL/egl.h> @@ -210,7 +205,6 @@ protected: QVector<QSGNode*> *m_sceneGraphNodes; }; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) class DelegatedNodeTreeUpdater : public DelegatedNodeTreeHandler { public: @@ -305,7 +299,6 @@ public: private: QVector<QSGNode*>::iterator m_nodeIterator; }; -#endif class DelegatedNodeTreeCreator : public DelegatedNodeTreeHandler { @@ -875,13 +868,8 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData, // We first compare if the render passes from the previous frame data are structurally // equivalent to the render passes in the current frame data. If they are, we are going // to reuse the old nodes. Otherwise, we will delete the old nodes and build a new tree. -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) cc::CompositorFrame *previousFrameData = &m_chromiumCompositorData->previousFrameData; const bool buildNewTree = !areRenderPassStructuresEqual(frameData, previousFrameData) || m_sceneGraphNodes.empty(); -#else - // No updates possible with old scenegraph nodes - const bool buildNewTree = true; -#endif m_chromiumCompositorData->previousFrameData = cc::CompositorFrame(); SGObjects previousSGObjects; @@ -895,13 +883,11 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData, delete oldChain; m_sceneGraphNodes.clear(); nodeHandler.reset(new DelegatedNodeTreeCreator(&m_sceneGraphNodes, apiDelegate)); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) } else { // Save the texture strong refs so they only go out of scope when the method returns and // the new vector of texture strong refs has been filled. qSwap(m_sgObjects.textureStrongRefs, textureStrongRefs); nodeHandler.reset(new DelegatedNodeTreeUpdater(&m_sceneGraphNodes)); -#endif } // The RenderPasses list is actually a tree where a parent RenderPass is connected // to its dependencies through a RenderPassId reference in one or more RenderPassQuads. diff --git a/src/core/proxy_config_service_qt.cpp b/src/core/proxy_config_service_qt.cpp index b7ed8362448a0e9ab35c661aeb695c937fa4e8ec..fed3da7f589b8bc75648ad0aaf4e89db4d00277b 100644 --- a/src/core/proxy_config_service_qt.cpp +++ b/src/core/proxy_config_service_qt.cpp @@ -109,13 +109,11 @@ net::ProxyConfigService::ConfigAvailability ProxyConfigServiceQt::GetLatestProxy } m_qtApplicationProxy = qtProxy; m_qtProxyConfig = net::ProxyConfig(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) if (qtProxy.type() == QNetworkProxy::NoProxy && QNetworkProxyFactory::usesSystemConfiguration()) { *config = systemConfig; return systemAvailability; } -#endif net::ProxyConfig::ProxyRules qtRules; net::ProxyServer server = fromQNetworkProxy(qtProxy); diff --git a/src/core/render_widget_host_view_qt_delegate.h b/src/core/render_widget_host_view_qt_delegate.h index dda59a01a446f3f24b28393ce2868550b74a17a0..7461e7608d15fc210159de78151573a0761742f6 100644 --- a/src/core/render_widget_host_view_qt_delegate.h +++ b/src/core/render_widget_host_view_qt_delegate.h @@ -58,16 +58,9 @@ class QVariant; class QWindow; class QInputMethodEvent; -#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0)) -class QSGImageNode; -typedef QSGImageNode QSGInternalImageNode; -class QSGSimpleTextureNode; -typedef QSGSimpleTextureNode QSGTextureNode; -#else class QSGInternalImageNode; class QSGImageNode; typedef QSGImageNode QSGTextureNode; -#endif QT_END_NAMESPACE diff --git a/src/core/web_contents_adapter.cpp b/src/core/web_contents_adapter.cpp index 399c036a458190ae49557d36fcba4717aafc5c77..995ba1b2e5eeee6a8b02ed8bbacdb9243b696c0b 100644 --- a/src/core/web_contents_adapter.cpp +++ b/src/core/web_contents_adapter.cpp @@ -1184,9 +1184,7 @@ void WebContentsAdapter::startDragging(QObject *dragSource, const content::DropD bool dValid = true; QMetaObject::Connection onDestroyed = QObject::connect(dragSource, &QObject::destroyed, [&dValid](){ dValid = false; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) QDrag::cancel(); -#endif }); drag->setMimeData(mimeDataFromDropData(*d->currentDropData)); 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 a0ed0091827608e6034925e2bce9b79b34f77441..650a40988bd2736ece70ff1b24a8429ad6a70572 100644 --- a/src/webengine/render_widget_host_view_qt_delegate_quick.cpp +++ b/src/webengine/render_widget_host_view_qt_delegate_quick.cpp @@ -50,11 +50,6 @@ #include <private/qquickwindow_p.h> #include <private/qsgcontext_p.h> -#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0)) -#include <QSGSimpleRectNode> -#include <QSGSimpleTextureNode> -#endif - namespace QtWebEngineCore { RenderWidgetHostViewQtDelegateQuick::RenderWidgetHostViewQtDelegateQuick(RenderWidgetHostViewQtDelegateClient *client, bool isPopup) @@ -185,30 +180,17 @@ QSGLayer *RenderWidgetHostViewQtDelegateQuick::createLayer() QSGInternalImageNode *RenderWidgetHostViewQtDelegateQuick::createImageNode() { QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) return renderContext->sceneGraphContext()->createInternalImageNode(); -#else - return renderContext->sceneGraphContext()->createImageNode(); -#endif } QSGTextureNode *RenderWidgetHostViewQtDelegateQuick::createTextureNode() { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) return QQuickItem::window()->createImageNode(); -#else - return new QSGSimpleTextureNode(); -#endif } QSGRectangleNode *RenderWidgetHostViewQtDelegateQuick::createRectangleNode() { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) return QQuickItem::window()->createRectangleNode(); -#else - QSGRenderContext *renderContext = QQuickWindowPrivate::get(QQuickItem::window())->context; - return renderContext->sceneGraphContext()->createRectangleNode(); -#endif } void RenderWidgetHostViewQtDelegateQuick::update() diff --git a/src/webengine/ui_delegates_manager.cpp b/src/webengine/ui_delegates_manager.cpp index 6cc496d5b643b653b73e35508b2c16e2c76f970a..43e6e8817fe5486463da9e9af698af1f5e63f31c 100644 --- a/src/webengine/ui_delegates_manager.cpp +++ b/src/webengine/ui_delegates_manager.cpp @@ -560,11 +560,7 @@ void UIDelegatesManager::showToolTip(const QString &text) int width = QQmlProperty(m_toolTip.data(), QStringLiteral("width")).read().toInt(); QSize toolTipSize(width, height); QPoint position = m_view->cursor().pos(); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 7, 0)) position = m_view->mapFromGlobal(calculateToolTipPosition(position, toolTipSize)).toPoint(); -#else - position = m_view->window()->mapFromGlobal(calculateToolTipPosition(position, toolTipSize)); -#endif QQmlProperty(m_toolTip.data(), QStringLiteral("x")).write(position.x()); QQmlProperty(m_toolTip.data(), QStringLiteral("y")).write(position.y()); diff --git a/src/webenginewidgets/api/qwebenginehistory.h b/src/webenginewidgets/api/qwebenginehistory.h index 21ebbf41dffe19910fd7c7faf2a4fe9a6c556e77..33d91d52348276e996e9ca92c77c74e1d14d1230 100644 --- a/src/webenginewidgets/api/qwebenginehistory.h +++ b/src/webenginewidgets/api/qwebenginehistory.h @@ -79,9 +79,7 @@ private: friend class QWebEngineHistoryPrivate; }; -#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QWebEngineHistoryItem) -#endif class QWebEngineHistoryPrivate; class QWEBENGINEWIDGETS_EXPORT QWebEngineHistory { diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 34728834eade43e913711dd63439db0eaaec1499..178f6ec9868aa579c98964ada04c19e5f3a261bc 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -101,13 +101,8 @@ static const int MaxTooltipLength = 1024; static bool printPdfDataOnPrinter(const QByteArray& data, QPrinter& printer) { if (!data.size()) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) qWarning("Failure to print on printer %ls: Print result data is empty.", qUtf16Printable(printer.printerName())); -#else - qWarning("Failure to print on printer %s: Print result data is empty.", - qPrintable(printer.printerName())); -#endif return false; } @@ -143,11 +138,7 @@ static bool printPdfDataOnPrinter(const QByteArray& data, QPrinter& printer) QPainter painter; if (!painter.begin(&printer)) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) qWarning("Failure to print on printer %ls: Could not open printer for painting.", qUtf16Printable(printer.printerName())); -#else - qWarning("Failure to print on printer %s: Could not open printer for painting.", qPrintable(printer.printerName())); -#endif return false; } @@ -2119,11 +2110,7 @@ void QWebEnginePage::printToPdf(const QString &filePath, const QPageLayout &page Q_D(const QWebEnginePage); #if defined(ENABLE_PRINTING) if (d->currentPrinter) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) qWarning("Cannot print to PDF while at the same time printing on printer %ls", qUtf16Printable(d->currentPrinter->printerName())); -#else - qWarning("Cannot print to PDF while at the same time printing on printer %s", qPrintable(d->currentPrinter->printerName())); -#endif return; } #endif // ENABLE_PRINTING @@ -2152,11 +2139,7 @@ void QWebEnginePage::printToPdf(const QWebEngineCallback<const QByteArray&> &res #if defined(ENABLE_PDF) #if defined(ENABLE_PRINTING) if (d->currentPrinter) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) qWarning("Cannot print to PDF while at the same time printing on printer %ls", qUtf16Printable(d->currentPrinter->printerName())); -#else - qWarning("Cannot print to PDF while at the same time printing on printer %s", qPrintable(d->currentPrinter->printerName())); -#endif d->m_callbacks.invokeEmpty(resultCallback); return; } @@ -2188,11 +2171,7 @@ void QWebEnginePage::print(QPrinter *printer, const QWebEngineCallback<bool> &re #if defined(ENABLE_PDF) #if defined(ENABLE_PRINTING) if (d->currentPrinter) { -#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) qWarning("Cannot print page on printer %ls: Already printing on %ls.", qUtf16Printable(printer->printerName()), qUtf16Printable(d->currentPrinter->printerName())); -#else - qWarning("Cannot print page on printer %s: Already printing on %s.", qPrintable(printer->printerName()), qPrintable(d->currentPrinter->printerName())); -#endif d->m_callbacks.invokeDirectly(resultCallback, false); return; } diff --git a/src/webenginewidgets/api/qwebenginescript.h b/src/webenginewidgets/api/qwebenginescript.h index 34c13e4b7d8eef3bb0944ea8cdbcd8ccf1080155..e3f65ec5928c60510ea3e52b2c3899f15aae7569 100644 --- a/src/webenginewidgets/api/qwebenginescript.h +++ b/src/webenginewidgets/api/qwebenginescript.h @@ -102,9 +102,7 @@ private: QSharedDataPointer<QtWebEngineCore::UserScript> d; }; -#if QT_VERSION >= QT_VERSION_CHECK(5,6,0) Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QWebEngineScript) -#endif #ifndef QT_NO_DEBUG_STREAM QWEBENGINEWIDGETS_EXPORT QDebug operator<<(QDebug, const QWebEngineScript &); 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 d02191b2335f67e432855d4c44baa4fdbe7f3e9f..a504506a05cf115f40284a5c8aa177d72c2d6445 100644 --- a/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp +++ b/src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp @@ -51,10 +51,6 @@ #include <QWindow> #include <private/qquickwindow_p.h> -#if (QT_VERSION < QT_VERSION_CHECK(5, 8, 0)) -#include <QSGSimpleRectNode> -#include <QSGSimpleTextureNode> -#endif #include <private/qwidget_p.h> namespace QtWebEngineCore { @@ -115,8 +111,6 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende { setFocusPolicy(Qt::StrongFocus); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)) - QSurfaceFormat format; format.setDepthBufferSize(24); format.setStencilBufferSize(8); @@ -149,7 +143,6 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende } setFormat(format); -#endif #endif setMouseTracking(true); setAttribute(Qt::WA_AcceptTouchEvents); @@ -290,30 +283,17 @@ QSGLayer *RenderWidgetHostViewQtDelegateWidget::createLayer() QSGInternalImageNode *RenderWidgetHostViewQtDelegateWidget::createImageNode() { QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context; -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) return renderContext->sceneGraphContext()->createInternalImageNode(); -#else - return renderContext->sceneGraphContext()->createImageNode(); -#endif } QSGTextureNode *RenderWidgetHostViewQtDelegateWidget::createTextureNode() { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) return quickWindow()->createImageNode(); -#else - return new QSGSimpleTextureNode(); -#endif } QSGRectangleNode *RenderWidgetHostViewQtDelegateWidget::createRectangleNode() { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)) return quickWindow()->createRectangleNode(); -#else - QSGRenderContext *renderContext = QQuickWindowPrivate::get(quickWindow())->context; - return renderContext->sceneGraphContext()->createRectangleNode(); -#endif } void RenderWidgetHostViewQtDelegateWidget::update()