Changeset 574 for trunk/src


Ignore:
Timestamp:
Feb 17, 2010, 9:58:24 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: Printing/CUPS: Fixed: Temporary files created by CUPS on request were not always deleted.

Location:
trunk/src/gui/painting
Files:
2 edited

Legend:

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

    r573 r574  
    377377    if (!isAvailable())
    378378        return false;
    379     return _cupsGetPPD(printerName) != 0;
     379    const char *ppdFile = _cupsGetPPD(printerName);
     380    if (ppdFile != 0)
     381        unlink(ppdFile);
     382    return ppdFile != 0;
    380383}
    381384
  • trunk/src/gui/painting/qpdf.cpp

    r573 r574  
    16841684        outDevice = new QFile();
    16851685        static_cast<QFile *>(outDevice)->open(ret.first, QIODevice::WriteOnly);
     1686        // save fd to get the temporary file closed in closePrintDevice()
     1687        fd = ret.first;
    16861688#endif
    16871689#ifndef QT_NO_LPR
Note: See TracChangeset for help on using the changeset viewer.