diff options
author | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 21:06:47 +0200 |
---|---|---|
committer | Tarja Sundqvist <tarja.sundqvist@qt.io> | 2023-03-23 21:06:47 +0200 |
commit | 42e4ae042a4c86e58bcb8b6d2d59ba4a988285b4 (patch) | |
tree | a7f25b1d335a834a7c3ae104cee913ef3a4dd4fb /src/printsupport/dialogs/qprintdialog_unix.cpp | |
parent | 4ee4fc18b4067b90efa46ca9baba74f53b54d9ec (diff) | |
parent | 168ff3419f256fdb35b586275d293fc0cd773fe1 (diff) |
Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into tqtc/lts-5.15-opensourcev5.15.9-lts-lgpl
Change-Id: Iaff6b55275e50d19973e1020853d8622587069f9
Diffstat (limited to 'src/printsupport/dialogs/qprintdialog_unix.cpp')
-rw-r--r-- | src/printsupport/dialogs/qprintdialog_unix.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/printsupport/dialogs/qprintdialog_unix.cpp b/src/printsupport/dialogs/qprintdialog_unix.cpp index c5b845f4ec..236e9b4980 100644 --- a/src/printsupport/dialogs/qprintdialog_unix.cpp +++ b/src/printsupport/dialogs/qprintdialog_unix.cpp @@ -702,13 +702,14 @@ void QPrintDialogPrivate::selectPrinter(const QPrinter::OutputFormat outputForma else options.grayscale->setChecked(true); - // keep duplex value explicitly set by user, if any, and selected printer supports it; - // use device default otherwise + // duplex priorities to be as follows: + // 1) a user-selected duplex value in the dialog has highest prority + // 2) duplex value set in the QPrinter QPrint::DuplexMode duplex; if (explicitDuplexMode != QPrint::DuplexAuto && supportedDuplexMode.contains(explicitDuplexMode)) duplex = explicitDuplexMode; else - duplex = top->d->m_currentPrintDevice.defaultDuplexMode(); + duplex = static_cast<QPrint::DuplexMode>(p->duplex()); switch (duplex) { case QPrint::DuplexNone: options.noDuplex->setChecked(true); break; |