QtPrintSupport: Fix QPrintDialog assert
Fix an assert that wasn't changed when the "Print to PS" option was removed Change-Id: Ife7350976707059861660a74dc2f89d302d861f0 Reviewed-by: Teemu Katajisto <teemu.katajisto@digia.com> Reviewed-by: John Layt <jlayt@kde.org>
This commit is contained in:
parent
3be6ca3ee8
commit
d9a7f9488f
@ -739,7 +739,7 @@ void QUnixPrintWidgetPrivate::_q_printerChanged(int index)
|
||||
widget.lOutput->setEnabled(false);
|
||||
|
||||
if (filePrintersAdded) {
|
||||
Q_ASSERT(index != printerCount - 3); // separator
|
||||
Q_ASSERT(index != printerCount - 2); // separator
|
||||
if (index == printerCount - 1) { // PDF
|
||||
widget.location->setText(QPrintDialog::tr("Local file"));
|
||||
widget.type->setText(QPrintDialog::tr("Write PDF file"));
|
||||
@ -958,7 +958,7 @@ void QUnixPrintWidgetPrivate::setupPrinter()
|
||||
|
||||
if (filePrintersAdded && index == printerCount - 1) { // PDF
|
||||
printer->setPrinterName(QString());
|
||||
Q_ASSERT(index != printerCount - 3); // separator
|
||||
Q_ASSERT(index != printerCount - 2); // separator
|
||||
printer->setOutputFormat(QPrinter::PdfFormat);
|
||||
QString path = widget.filename->text();
|
||||
if (QDir::isRelativePath(path))
|
||||
|
Loading…
Reference in New Issue
Block a user