From d9a6d2e28e4a38ff1242e5e9b1d2225844a51a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Trond=20Kjern=C3=A5sen?= Date: Thu, 11 Feb 2010 15:39:56 +0100 Subject: Make QCUPSSupport::printerHasPPD() clean up after itself. This call "leaked" a temporary file in /tmp every time a QPrinter object was created. Not very nice at all. Task-number: QTBUG-6419 Reviewed-by: Kim --- src/gui/painting/qcups.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qcups.cpp b/src/gui/painting/qcups.cpp index 7903762..ac41692 100644 --- a/src/gui/painting/qcups.cpp +++ b/src/gui/painting/qcups.cpp @@ -342,7 +342,9 @@ bool QCUPSSupport::printerHasPPD(const char *printerName) { if (!isAvailable()) return false; - return _cupsGetPPD(printerName) != 0; + const char *ppdFile = _cupsGetPPD(printerName); + unlink(ppdFile); + return (ppdFile != 0); } QString QCUPSSupport::unicodeString(const char *s) -- cgit v0.12