diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-08-03 14:23:15 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2017-08-04 14:39:15 +0000 |
commit | 49b94b14d3da42f945f6d49a3288c3ede5b98d36 (patch) | |
tree | 6e95061814802b18bf3444780d84f3d8ed8c32b1 /src | |
parent | a9ef2ecb1f1941a9295c58b63987565e6d3518cb (diff) |
Remove support for building with Qt versions < 5.8.0
Change-Id: I2f2ba754111e198298b7d1a595343fcd773e05e5
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/api/qtwebenginecoreglobal.cpp | 2 | ||||
-rw-r--r-- | src/core/api/qwebenginecallback.h | 2 | ||||
-rw-r--r-- | src/core/api/qwebenginecallback_p.h | 2 | ||||
-rw-r--r-- | src/core/delegated_frame_node.cpp | 14 | ||||
-rw-r--r-- | src/core/proxy_config_service_qt.cpp | 2 | ||||
-rw-r--r-- | src/core/render_widget_host_view_qt_delegate.h | 7 | ||||
-rw-r--r-- | src/core/web_contents_adapter.cpp | 2 | ||||
-rw-r--r-- | src/webengine/render_widget_host_view_qt_delegate_quick.cpp | 18 | ||||
-rw-r--r-- | src/webengine/ui_delegates_manager.cpp | 4 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginehistory.h | 2 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 21 | ||||
-rw-r--r-- | src/webenginewidgets/api/qwebenginescript.h | 2 | ||||
-rw-r--r-- | src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp | 20 |
13 files changed, 0 insertions, 98 deletions
diff --git a/src/core/api/qtwebenginecoreglobal.cpp b/src/core/api/qtwebenginecoreglobal.cpp index 072f27967..0353dac7d 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 b967f926a..b981b2afb 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 b88ef4d2c..fdaf84d21 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 9a4d1ba91..5d6353740 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 b7ed83624..fed3da7f5 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 dda59a01a..7461e7608 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 399c036a4..995ba1b2e 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 a0ed00918..650a40988 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 6cc496d5b..43e6e8817 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 21ebbf41d..33d91d523 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 34728834e..178f6ec98 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 34c13e4b7..e3f65ec59 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 d02191b23..a504506a0 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); @@ -150,7 +144,6 @@ RenderWidgetHostViewQtDelegateWidget::RenderWidgetHostViewQtDelegateWidget(Rende setFormat(format); #endif -#endif setMouseTracking(true); setAttribute(Qt::WA_AcceptTouchEvents); setAttribute(Qt::WA_OpaquePaintEvent); @@ -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() |