summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Layt <jlayt@kde.org>2013-11-23 15:42:56 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-27 21:06:30 +0100
commit73ef64fb5fabb60101a3cac6e43f0c5bb2298000 (patch)
tree0a17e0c7e916d73824f2e952f54f7661d26010fa /src
parentdc03e0c429c4398ca7905285a30741a7ad8c9daf (diff)
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 <gunnar.sletta@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/global/qfeatures.txt2
-rw-r--r--src/printsupport/kernel/qprinter.cpp8
2 files changed, 1 insertions, 9 deletions
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 <private/qpagedpaintdevice_p.h>
-
-#ifndef QT_NO_PDF
#include "qprintengine_pdf_p.h"
-#endif
#include <qpicture.h>
#include <private/qpaintengine_preview_p.h>
@@ -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
}
/*!