[PATCH] rely on CUPS for multiple page ranges in unix version of QPrintDialog
authorAlexander Stippich <a.stippich@gmx.net>
Wed, 26 Feb 2025 19:46:04 +0000 (20:46 +0100)
committerPatrick Franz <deltaone@debian.org>
Fri, 18 Jul 2025 13:28:20 +0000 (15:28 +0200)
commit57a0529ed1e00c690cae3b0df65ed857e39a914a
tree06a20c54940151a66bf3ca1e1012cfaf4c369c02
parentc2f2b75fe0a260da7f8236d1d3cbe799fe484eef
[PATCH] rely on CUPS for multiple page ranges in unix version of QPrintDialog

Since the introduction of QPageRanges with Qt6, multiple/arbitrary page
ranges are broken in the unix implementation of QPrintDialog due to a
possible double application of the page ranges: on the application side
and on the server side with CUPS. Reason for this is that the
QPrinter::PrintRange is set to PageRange instead of AllPages.
The latter is needed when relying on the CUPS server-side page range.
However, the server-side page range is always applied later on.

Restore the behavior of Qt5 and set the PrintRange to AllPages for
multiple/arbitrary page ranges and rely on the server-side filtering
with CUPS.

Change-Id: I1b85552a8cf2509b11a81db028f957584043f3ee
Reviewed-by: Albert Astals Cid <aacid@kde.org>
Reviewed-by: David Faure <david.faure@kdab.com>
(cherry picked from commit 2428cbf44e3e2aa4eaf00c9548ac5a74685101c4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
(cherry picked from commit b630ed4ef8c7ae43c8ab2a8826d664995cc8b685)

Gbp-Pq: Name upstream_cups_for_multiple_page_ranges.diff
src/printsupport/dialogs/qprintdialog_unix.cpp