diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-04-29 04:33:52 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-04-29 04:33:52 (GMT) |
commit | e79ce618a079c7f1664959da5d9d13b5f4e1d370 (patch) | |
tree | dabf9efe361c27cec4377de04e1a24ae3eca03fb /src/gui/painting/qprinter.cpp | |
parent | f49f040660fd004ea6289cdc3a92a7ad42338237 (diff) | |
parent | 9ba03ca32ae12f8b135f3b4f80c445edc3e6b55e (diff) | |
download | Qt-e79ce618a079c7f1664959da5d9d13b5f4e1d370.zip Qt-e79ce618a079c7f1664959da5d9d13b5f4e1d370.tar.gz Qt-e79ce618a079c7f1664959da5d9d13b5f4e1d370.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'src/gui/painting/qprinter.cpp')
-rw-r--r-- | src/gui/painting/qprinter.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp index 4f3e71c..5161e32 100644 --- a/src/gui/painting/qprinter.cpp +++ b/src/gui/painting/qprinter.cpp @@ -834,11 +834,15 @@ void QPrinter::setPrinterName(const QString &name) #endif QList<QPrinterInfo> prnList = QPrinterInfo::availablePrinters(); - d->validPrinter = false; - for (int i = 0; i < prnList.size(); ++i) { - if (prnList[i].printerName() == name) { - d->validPrinter = true; - break; + if (name.isEmpty()) { + d->validPrinter = d->outputFormat == QPrinter::PdfFormat || d->outputFormat == QPrinter::PostScriptFormat; + } else { + d->validPrinter = false; + for (int i = 0; i < prnList.size(); ++i) { + if (prnList[i].printerName() == name) { + d->validPrinter = true; + break; + } } } |