From 41eddfaa4af8aba3820c8401993600e83633f9bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Wed, 21 Sep 2016 18:02:51 +0200 Subject: Move the QPrinter and QtWidgets related code out of the PDFium wrapper This moves the actual printing using QPrinter to the WebEngineWidgets part of the API. The printsupport module depends on the widgets module and therefore QtWebEngineCore also had a dependency to widgets. This is removed by this change. Change-Id: If6e5745709a59de18f2123b930cbe6e64390c867 Reviewed-by: Michal Klocek --- tests/auto/widgets/qwebenginepage/qwebenginepage.pro | 2 ++ tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/auto/widgets/qwebenginepage/qwebenginepage.pro b/tests/auto/widgets/qwebenginepage/qwebenginepage.pro index 70786e70f..df733c473 100644 --- a/tests/auto/widgets/qwebenginepage/qwebenginepage.pro +++ b/tests/auto/widgets/qwebenginepage/qwebenginepage.pro @@ -1,2 +1,4 @@ include(../tests.pri) QT *= core-private gui-private + +contains(WEBENGINE_CONFIG, enable_pdf): DEFINES+=QWEBENGINEPAGE_PDFPRINTINGENABLED diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp index 0b6354cc2..1377c9a52 100644 --- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -4895,6 +4895,9 @@ void tst_QWebEnginePage::setZoomFactor() void tst_QWebEnginePage::printToPdf() { +#if !defined(QWEBENGINEPAGE_PDFPRINTINGENABLED) + QSKIP("QWEBENGINEPAGE_PDFPRINTINGENABLED"); +#else QTemporaryDir tempDir(QDir::tempPath() + "/tst_qwebengineview-XXXXXX"); QVERIFY(tempDir.isValid()); QWebEnginePage page; @@ -4922,6 +4925,7 @@ void tst_QWebEnginePage::printToPdf() CallbackSpy failedInvalidLayoutSpy; page.printToPdf(failedInvalidLayoutSpy.ref(), QPageLayout()); QCOMPARE(failedInvalidLayoutSpy.waitForResult().length(), 0); +#endif } void tst_QWebEnginePage::mouseButtonTranslation() -- cgit v1.2.3