diff options
author | Michael BrĂ¼ning <michael.bruning@qt.io> | 2017-12-14 12:43:16 +0100 |
---|---|---|
committer | Michael BrĂ¼ning <michael.bruning@qt.io> | 2017-12-14 13:58:53 +0000 |
commit | d4b3d9457bbe090c4ecc0d5a7d70e7bb08b22b90 (patch) | |
tree | 35b18f447d52defc2bd93cd3dd60c1e8fbfc9c40 /src/webenginewidgets/api | |
parent | aead0729aaab970b95220bd864520d7635d7a33f (diff) |
Turn off caching of images rendered for the printer
When printing very large documents using the QPrinter-based API, it
was possible to run out of memory because the images that pdfium has
generated was cached for reuse when printing multiple copies of the
document.
Caching the images is now removed as printing multiple copies is not
the default use case and is nowadays often also handled by the printer
itself.
Task-number: QTBUG-58400
Change-Id: I27bd17b33a839a845ca1b387b0c3bd0466b6592f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/webenginewidgets/api')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.cpp b/src/webenginewidgets/api/qwebenginepage.cpp index 3290a2a70..ae6276fdc 100644 --- a/src/webenginewidgets/api/qwebenginepage.cpp +++ b/src/webenginewidgets/api/qwebenginepage.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2017 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtWebEngine module of the Qt Toolkit. @@ -143,9 +143,11 @@ 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())); + 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())); + qWarning("Failure to print on printer %s: Could not open printer for painting.", + qPrintable(printer.printerName())); #endif return false; } |