summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprinter.cpp
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2012-05-08 12:56:45 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-08 06:58:27 +0200
commitde11b9f5a7aaab79e816983a72b8e92ac84ce5d6 (patch)
treeaafbf1b22400bbaf90046b415490667164a2d93a /src/printsupport/kernel/qprinter.cpp
parent80f7a388906f94f58bf765a32b9abbb16f967db2 (diff)
Revert "QtPrintSupport: Remove remaining LPR specific code"
This doesn't compile with a typical cross-compilation setup, which generally won't include cups headers. The commit should have been rejected, but wasn't, due to a bug in the Qt Project CI. Since it now causes all other modules depending on qtbase to fail their CI, it must be reverted to minimize disruption while the commit can be amended and/or the test toolchain updated to include cups headers. This reverts commit 80f7a388906f94f58bf765a32b9abbb16f967db2. Change-Id: I315ae275b37de358a74af28ab7bd691c9849acba Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Diffstat (limited to 'src/printsupport/kernel/qprinter.cpp')
-rw-r--r--src/printsupport/kernel/qprinter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp
index a0033aa52a..4929b3308e 100644
--- a/src/printsupport/kernel/qprinter.cpp
+++ b/src/printsupport/kernel/qprinter.cpp
@@ -41,18 +41,17 @@
#include "qprinter_p.h"
#include "qprinter.h"
-
-#ifndef QT_NO_PRINTER
-
#include "qprintengine.h"
#include "qprinterinfo.h"
#include "qlist.h"
#include <qcoreapplication.h>
#include <qfileinfo.h>
-#if !defined(QT_NO_CUPS)
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
#include "private/qcups_p.h"
#endif
+#ifndef QT_NO_PRINTER
+
#include <qpa/qplatformprintplugin.h>
#include <qpa/qplatformprintersupport.h>
#include <private/qpagedpaintdevice_p.h>
@@ -237,7 +236,7 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke
When printing directly to a printer on Windows or Mac OS X, QPrinter uses
the built-in printer drivers. On X11, QPrinter uses the
- \l{Common Unix Printing System (CUPS)}
+ \l{Common Unix Printing System (CUPS)} or the standard Unix \l lpr utility
to send PDF output to the printer. As an alternative,
the printProgram() function can be used to specify the command or utility
to use instead of the system default.
@@ -555,7 +554,7 @@ void QPrinterPrivate::init(QPrinter::PrinterMode mode)
realPrintEngine = 0;
realPaintEngine = 0;
-#if !defined(QT_NO_CUPS)
+#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY)
if (QCUPSSupport::cupsVersion() >= 10200 && QCUPSSupport().currentPPD()) {
q_func()->setOutputFormat(QPrinter::PdfFormat);
outputFormat = QPrinter::NativeFormat;