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>
This commit is contained in:
John Layt 2013-11-23 15:42:56 +01:00 committed by The Qt Project
parent dc03e0c429
commit 73ef64fb5f
2 changed files with 1 additions and 9 deletions

View File

@ -748,7 +748,7 @@ Name: QPdf
Feature: PRINTER
Description: Supports printing
Section: Painting
Requires: PICTURE TEMPORARYFILE
Requires: PICTURE TEMPORARYFILE PDF
Name: QPrinter
Feature: CUPS

View File

@ -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
}
/*!