compile with QT_NO_CUPS
This commit is contained in:
parent
f190d39197
commit
3a1f80ac92
@ -48,17 +48,23 @@ QT_BEGIN_NAMESPACE
|
||||
|
||||
QList<QPrinter::PaperSize> QGenericUnixPrinterSupport::supportedPaperSizes(const QPrinterInfo &printerInfo) const
|
||||
{
|
||||
#ifndef QT_NO_CUPS
|
||||
return QCUPSSupport::getCupsPrinterPaperSizes(QPlatformPrinterSupport::printerInfoCupsPrinterIndex(printerInfo));
|
||||
#else
|
||||
return QList<QPrinter::PaperSize>();
|
||||
#endif
|
||||
}
|
||||
|
||||
QList<QPrinterInfo> QGenericUnixPrinterSupport::availablePrinters()
|
||||
{
|
||||
QList<QPrinterInfo> 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user