From 73ef64fb5fabb60101a3cac6e43f0c5bb2298000 Mon Sep 17 00:00:00 2001 From: John Layt Date: Sat, 23 Nov 2013 15:42:56 +0100 Subject: QPrinter - Make PDF support required for QPrinter Most of QPrinter assumes that QPdf is available as the fall back engine in case either the plugin fails to load or there are no real printers configured. Make this assumption explicit in the feature configure and remove the two places where QT_NO_PDF is actually checked. Change-Id: Ibb1bdf3bafa5809fbc844c84d7127911a1685506 Reviewed-by: Gunnar Sletta --- src/corelib/global/qfeatures.txt | 2 +- src/printsupport/kernel/qprinter.cpp | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) (limited to 'src') diff --git a/src/corelib/global/qfeatures.txt b/src/corelib/global/qfeatures.txt index 84c9379bbc..fb6e56ec7d 100644 --- a/src/corelib/global/qfeatures.txt +++ b/src/corelib/global/qfeatures.txt @@ -748,7 +748,7 @@ Name: QPdf Feature: PRINTER Description: Supports printing Section: Painting -Requires: PICTURE TEMPORARYFILE +Requires: PICTURE TEMPORARYFILE PDF Name: QPrinter Feature: CUPS diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index 0905cbb59f..819f9343f7 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -55,10 +55,7 @@ #include - -#ifndef QT_NO_PDF #include "qprintengine_pdf_p.h" -#endif #include #include @@ -618,8 +615,6 @@ QPrinter::~QPrinter() */ void QPrinter::setOutputFormat(OutputFormat format) { - -#ifndef QT_NO_PDF Q_D(QPrinter); if (d->validPrinter && d->outputFormat == format) return; @@ -651,9 +646,6 @@ void QPrinter::setOutputFormat(OutputFormat format) if (d->outputFormat == QPrinter::PdfFormat) d->validPrinter = true; -#else - Q_UNUSED(format); -#endif } /*! -- cgit v1.2.3