summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-04-21 12:52:11 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-04-21 12:56:54 (GMT)
commit49b4685a185f6932bcf4c685dc211cf2c4a3dddd (patch)
tree28045777f156b6fbecfa7224a9bca106be54af5e /src
parentdf9977ebce528047c39d5cf35f452bb2f42cf2e9 (diff)
downloadQt-49b4685a185f6932bcf4c685dc211cf2c4a3dddd.zip
Qt-49b4685a185f6932bcf4c685dc211cf2c4a3dddd.tar.gz
Qt-49b4685a185f6932bcf4c685dc211cf2c4a3dddd.tar.bz2
Fix a problem where QPrintDialog/Unix didn't update print-to-file states.
Setting a QPrinter to print to e.g. a PDF file and then passing the QPrinter object to a QPrintDialog didn't update the printer combobox and filename lineedit states correctly. Task-number: 224728 Reviewed-by: Samuel
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qprintdialog_unix.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp
index 76c22d0..87a4e65 100644
--- a/src/gui/dialogs/qprintdialog_unix.cpp
+++ b/src/gui/dialogs/qprintdialog_unix.cpp
@@ -727,7 +727,9 @@ void QUnixPrintWidgetPrivate::updateWidget()
widget.printers->removeItem(widget.printers->count()-1); // remove separator
filePrintersAdded = false;
}
- if (printer && filePrintersAdded && printer->printerName().isEmpty()) {
+ if (printer && filePrintersAdded && (printer->outputFormat() != QPrinter::NativeFormat
+ || printer->printerName().isEmpty()))
+ {
if (printer->outputFormat() == QPrinter::PdfFormat)
widget.printers->setCurrentIndex(widget.printers->count() - 2);
else if (printer->outputFormat() == QPrinter::PostScriptFormat)