diff options
| author | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-07 10:59:58 +0200 |
|---|---|---|
| committer | Volker Hilsheimer <volker.hilsheimer@qt.io> | 2020-09-10 17:29:52 +0200 |
| commit | 8186bd628f701744a528d83c22346abcd6c46384 (patch) | |
| tree | 5230d30d57376e65241c6ee4dd9a18bb52888562 /src/printsupport/dialogs/qprintdialog_win.cpp | |
| parent | 1b02cfd38de113ff7c68a28b72622b26c4cd8250 (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 'src/printsupport/dialogs/qprintdialog_win.cpp')
| -rw-r--r-- | src/printsupport/dialogs/qprintdialog_win.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_win.cpp b/src/printsupport/dialogs/qprintdialog_win.cpp index 11f2fa32598..c103bd911dd 100644 --- a/src/printsupport/dialogs/qprintdialog_win.cpp +++ b/src/printsupport/dialogs/qprintdialog_win.cpp @@ -98,21 +98,21 @@ static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent, pd->Flags = PD_RETURNDC; pd->Flags |= PD_USEDEVMODECOPIESANDCOLLATE; - if (!pdlg->isOptionEnabled(QPrintDialog::PrintSelection)) + if (!pdlg->testOption(QPrintDialog::PrintSelection)) pd->Flags |= PD_NOSELECTION; - if (pdlg->isOptionEnabled(QPrintDialog::PrintPageRange)) { + if (pdlg->testOption(QPrintDialog::PrintPageRange)) { pd->nMinPage = pdlg->minPage(); pd->nMaxPage = pdlg->maxPage(); } - if(!pdlg->isOptionEnabled(QPrintDialog::PrintToFile)) + if (!pdlg->testOption(QPrintDialog::PrintToFile)) pd->Flags |= PD_DISABLEPRINTTOFILE; - if (pdlg->isOptionEnabled(QPrintDialog::PrintSelection) && pdlg->printRange() == QPrintDialog::Selection) + if (pdlg->testOption(QPrintDialog::PrintSelection) && pdlg->printRange() == QPrintDialog::Selection) pd->Flags |= PD_SELECTION; - else if (pdlg->isOptionEnabled(QPrintDialog::PrintPageRange) && pdlg->printRange() == QPrintDialog::PageRange) + else if (pdlg->testOption(QPrintDialog::PrintPageRange) && pdlg->printRange() == QPrintDialog::PageRange) pd->Flags |= PD_PAGENUMS; - else if (pdlg->isOptionEnabled(QPrintDialog::PrintCurrentPage) && pdlg->printRange() == QPrintDialog::CurrentPage) + else if (pdlg->testOption(QPrintDialog::PrintCurrentPage) && pdlg->printRange() == QPrintDialog::CurrentPage) pd->Flags |= PD_CURRENTPAGE; else pd->Flags |= PD_ALLPAGES; @@ -123,7 +123,7 @@ static void qt_win_setup_PRINTDLGEX(PRINTDLGEX *pd, QWidget *parent, pd->Flags |= PD_NOPAGENUMS; // Disable Current Page option if not required as default is Enabled - if (!pdlg->isOptionEnabled(QPrintDialog::PrintCurrentPage)) + if (!pdlg->testOption(QPrintDialog::PrintCurrentPage)) pd->Flags |= PD_NOCURRENTPAGE; // Default to showing the General tab first |
