Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.3
-
None
Description
QPrintDialog::accept() does not work, if page ranges are entered on platform Linux (apparently since 6.0). Reason is a wrong sequence of instructions: 'printer()->pageRanges().isEmpty()' returns a wrong result, if 'd->setupPrinter()' is not called before.
qprintdialog_unix.cpp:
void QPrintDialog::accept() { Q_D(QPrintDialog); #if QT_CONFIG(cups) if (d->options.pagesRadioButton->isChecked() && printer()->pageRanges().isEmpty()) { QMessageBox::critical(this, tr("Invalid Pages Definition"), tr("%1 does not follow the correct syntax. Please use ',' to separate " "ranges and pages, '-' to define ranges and make sure ranges do " "not intersect with each other.").arg(d->options.pagesLineEdit->text()), QMessageBox::Ok, QMessageBox::Ok); return; } if (d->top->d->m_duplexPpdOption && d->top->d->m_duplexPpdOption->conflicted) { const QMessageBox::StandardButton answer = QMessageBox::warning(this, tr("Duplex Settings Conflicts"), tr("There are conflicts in duplex settings. Do you want to fix them?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); if (answer != QMessageBox::No) return; } #endif d->setupPrinter(); QDialog::accept(); }