From de11b9f5a7aaab79e816983a72b8e92ac84ce5d6 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 8 May 2012 12:56:45 +1000 Subject: 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 Reviewed-by: Toby Tomkins --- .../printersupport/genericunix/qgenericunixprintersupport.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp') diff --git a/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp index f60bba2a07..2fb9562545 100644 --- a/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp +++ b/src/platformsupport/printersupport/genericunix/qgenericunixprintersupport.cpp @@ -48,17 +48,23 @@ QT_BEGIN_NAMESPACE QList QGenericUnixPrinterSupport::supportedPaperSizes(const QPrinterInfo &printerInfo) const { +#ifndef QT_NO_CUPS return QCUPSSupport::getCupsPrinterPaperSizes(QPlatformPrinterSupport::printerInfoCupsPrinterIndex(printerInfo)); +#else + return QList(); +#endif } QList QGenericUnixPrinterSupport::availablePrinters() { QList printers; +#ifndef QT_NO_CUPS foreach (const QCUPSSupport::Printer &p, QCUPSSupport::availableUnixPrinters()) { QPrinterInfo printer(QPlatformPrinterSupport::printerInfo(p.name, p.isDefault)); QPlatformPrinterSupport::setPrinterInfoCupsPrinterIndex(&printer, p.cupsPrinterIndex); printers.append(printer); } +#endif return printers; } -- cgit v1.2.3