diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-11-15 14:52:37 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-11-17 08:35:51 +0000 |
commit | 80f0ec9375638b545043cf500e08ab786bc94c8c (patch) | |
tree | 842eba2d78dfb77b3ca6a5eb1c61e0230a7726b9 /src | |
parent | ac0ab4bc673927f562e4f905a0c20df8099dd479 (diff) |
Build with Qt 5.6
Make minimal changes so QtWebEngineCore 5.8 still builds with Qt LTR.
Change-Id: Iae3ae606b3457a6ca311ae174b3d2a331e9b20bc
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/delegated_frame_node.cpp | 6 | ||||
-rw-r--r-- | src/core/pdfium_printing_wrapper_qt.cpp | 4 | ||||
-rw-r--r-- | src/core/proxy_config_service_qt.cpp | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/core/delegated_frame_node.cpp b/src/core/delegated_frame_node.cpp index 44e37aeb6..baf064025 100644 --- a/src/core/delegated_frame_node.cpp +++ b/src/core/delegated_frame_node.cpp @@ -111,6 +111,10 @@ #define GL_RGB 0x1907 #endif +#ifndef GL_LINE_LOOP +#define GL_LINE_LOOP 0x0002 +#endif + namespace QtWebEngineCore { #ifndef QT_NO_OPENGL class MailboxTexture : public QSGTexture, protected QOpenGLFunctions { @@ -642,7 +646,7 @@ void DelegatedFrameNode::commit(ChromiumCompositorData *chromiumCompositorData, QSGGeometryNode *geometryNode = new QSGGeometryNode; QSGGeometry *geometry = new QSGGeometry(QSGGeometry::defaultAttributes_Point2D(), 4); - geometry->setDrawingMode(QSGGeometry::DrawLineLoop); + geometry->setDrawingMode(GL_LINE_LOOP); geometry->setLineWidth(dbquad->width); // QSGGeometry::updateRectGeometry would actually set the corners in the following order: // top-left, bottom-left, top-right, bottom-right, leading to a nice criss cross, instead diff --git a/src/core/pdfium_printing_wrapper_qt.cpp b/src/core/pdfium_printing_wrapper_qt.cpp index 165ac743f..fceb381af 100644 --- a/src/core/pdfium_printing_wrapper_qt.cpp +++ b/src/core/pdfium_printing_wrapper_qt.cpp @@ -139,7 +139,9 @@ PdfiumPrintingWrapperQt::PdfiumPrintingWrapperQt(const void *pdfData, size_t siz bool PdfiumPrintingWrapperQt::printOnPrinter(QPrinter &printer) { if (!m_documentHandle || !m_pageCount) { +#if QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) qWarning("Failure to print on printer %ls: invalid document.\n", qUtf16Printable(printer.printerName())); +#endif return false; } @@ -172,7 +174,9 @@ bool PdfiumPrintingWrapperQt::printOnPrinter(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.\n", qUtf16Printable(printer.printerName())); +#endif return false; } diff --git a/src/core/proxy_config_service_qt.cpp b/src/core/proxy_config_service_qt.cpp index 5bc30b6bc..a6ffb39ab 100644 --- a/src/core/proxy_config_service_qt.cpp +++ b/src/core/proxy_config_service_qt.cpp @@ -109,11 +109,13 @@ 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); |