Changeset 782 for trunk/src


Ignore:
Timestamp:
Aug 11, 2010, 3:16:44 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Send PDF data to a CUPS printer on OS/2 by default if CUPS is version 1.4.4 or above (where printing PDF data was fixed).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/painting/qprinter.cpp

    r651 r782  
    666666    d->realPaintEngine = 0;
    667667
    668     // Note: On OS/2, sending PDF data doesn't yet work with the current eCUPS
    669     // (which is version 1.3.11 of CUPS), so don't force the PDF format there
    670 #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) && !defined(Q_WS_PM)
     668#if !defined(QT_NO_CUPS) && (!defined(QT_NO_LIBRARY) || defined(Q_WS_PM))
     669    // Note: On OS/2, sending PDF data to eCUPS only works starting from
     670    // version 1.4.4 of CUPS
     671#if defined(Q_WS_PM)
     672    if (QCUPSSupport::cupsVersion() >= 10404 && QCUPSSupport().currentPPD()) {
     673#else
    671674    if (QCUPSSupport::cupsVersion() >= 10200 && QCUPSSupport().currentPPD()) {
     675
    672676        setOutputFormat(QPrinter::PdfFormat);
    673677        d->outputFormat = QPrinter::NativeFormat;
     
    825829    ABORT_IF_ACTIVE("QPrinter::setPrinterName");
    826830
    827 #if defined(Q_OS_UNIX) && !defined(QT_NO_CUPS)
     831#if ) && !defined(QT_NO_CUPS)
    828832    if(d->use_default_engine
    829833        && d->outputFormat == QPrinter::NativeFormat) {
    830         // Note: On OS/2, sending PDF data doesn't yet work with the current eCUPS
    831         // (which is version 1.3.11 of CUPS), so don't force the PDF format there
    832 #ifndef Q_WS_PM
     834        // Note: On OS/2, sending PDF data to eCUPS only works starting from
     835        // version 1.4.4 of CUPS
     836#if defined(Q_WS_PM)
     837        if (QCUPSSupport::cupsVersion() >= 10404
     838#else
    833839        if (QCUPSSupport::cupsVersion() >= 10200
     840
    834841            && QCUPSSupport::printerHasPPD(name.toLocal8Bit().constData()))
    835842            setOutputFormat(QPrinter::PdfFormat);
    836843        else
    837 #endif
    838844            setOutputFormat(QPrinter::PostScriptFormat);
    839845        d->outputFormat = QPrinter::NativeFormat;
Note: See TracChangeset for help on using the changeset viewer.