summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-07 10:59:58 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2020-09-10 17:29:52 +0200
commit8186bd628f701744a528d83c22346abcd6c46384 (patch)
tree5230d30d57376e65241c6ee4dd9a18bb52888562 /examples
parent1b02cfd38de113ff7c68a28b72622b26c4cd8250 (diff)
Remove obsolete APIs and comments from QAbstractPrintDialog
Merging QAbstractPrintDialog with QPrintDialog, as proposed in the removed comment, seems to have little value, given that the platform specific implementations rely on the current abstraction. Adjust examples and tests; with the QAbstractPrintDialog test now testing the QPrintDialog::options API, the corresponding test function can be removed from the QPrinter test. Change-Id: Ia8906627898332e8590ea9b27e3d71dfcc6e8d71 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/widgets/richtext/orderform/mainwindow.cpp2
-rw-r--r--examples/widgets/richtext/textedit/textedit.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/widgets/richtext/orderform/mainwindow.cpp b/examples/widgets/richtext/orderform/mainwindow.cpp
index ee6758c9cb..3916c28b1b 100644
--- a/examples/widgets/richtext/orderform/mainwindow.cpp
+++ b/examples/widgets/richtext/orderform/mainwindow.cpp
@@ -256,7 +256,7 @@ void MainWindow::printFile()
QPrintDialog dialog(&printer, this);
dialog.setWindowTitle(tr("Print Document"));
if (editor->textCursor().hasSelection())
- dialog.addEnabledOption(QAbstractPrintDialog::PrintSelection);
+ dialog.setOption(QAbstractPrintDialog::PrintSelection);
if (dialog.exec() != QDialog::Accepted) {
return;
}
diff --git a/examples/widgets/richtext/textedit/textedit.cpp b/examples/widgets/richtext/textedit/textedit.cpp
index 74b8e1c2b4..e2d373ceba 100644
--- a/examples/widgets/richtext/textedit/textedit.cpp
+++ b/examples/widgets/richtext/textedit/textedit.cpp
@@ -547,7 +547,7 @@ void TextEdit::filePrint()
QPrinter printer(QPrinter::HighResolution);
QPrintDialog *dlg = new QPrintDialog(&printer, this);
if (textEdit->textCursor().hasSelection())
- dlg->addEnabledOption(QAbstractPrintDialog::PrintSelection);
+ dlg->setOption(QAbstractPrintDialog::PrintSelection);
dlg->setWindowTitle(tr("Print Document"));
if (dlg->exec() == QDialog::Accepted)
textEdit->print(&printer);