From 4943d9801ccad59aef073374644fc991e49987e3 Mon Sep 17 00:00:00 2001 From: Szabolcs David Date: Thu, 3 Jun 2021 01:37:37 +0200 Subject: Drop printsupport dependency from core Prevent linkage of core to widgets by moving printing API from QWebEnginePage to View and using QPagedPaintDevice (the QtGui ancestor of QPrinter) where it's needed. Change-Id: I6ea96edb495b0dcaaa584bbe72632fda025c18d3 Reviewed-by: Allan Sandfeld Jensen --- src/core/api/qwebenginepage_p.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/api/qwebenginepage_p.h') diff --git a/src/core/api/qwebenginepage_p.h b/src/core/api/qwebenginepage_p.h index d2c246397..a830028f8 100644 --- a/src/core/api/qwebenginepage_p.h +++ b/src/core/api/qwebenginepage_p.h @@ -104,6 +104,9 @@ public: virtual void unhandledKeyEvent(QKeyEvent *event) = 0; virtual bool passOnFocus(bool reverse) = 0; virtual QObject *accessibilityParentObject() = 0; + virtual void didPrintPage(quint64 requestId, QSharedPointer result) = 0; + virtual void didPrintPageToPdf(const QString &filePath, bool success) = 0; + virtual void printRequested() = 0; }; class Q_WEBENGINECORE_PRIVATE_EXPORT QWebEnginePagePrivate : public QtWebEngineCore::WebContentsAdapterClient @@ -225,9 +228,6 @@ public: mutable QtWebEngineCore::CallbackDirectory m_callbacks; mutable QAction *actions[QWebEnginePage::WebActionCount]; -#if QT_CONFIG(webengine_printing_and_pdf) - QPrinter *currentPrinter; -#endif }; QT_END_NAMESPACE -- cgit v1.2.3