Qt print dialog has wrong default page size

Bug #1846821 reported by Maciej Puzio
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qtbase-opensource-src (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Unassigned

Bug Description

Please backport Qt patch 213677 to qtbase-opensource-src
https://codereview.qt-project.org/c/qt/qtbase/+/213677

[Impact]
In Qt5 applications, print dialog (Printer Properties) always defaults to A4 paper size, even when Letter is set as a default in all system and KDE preferences. After changing manually, Letter-size pages print correctly, but the setting does not stick.

This impacts users of Qt applications who print things and live in countries where ISO 216 is not default, most notably the United States.

[Test Case]
1) Use system settings (KDE preferences, gnome-control-center or system-config-printer) to set the printer size to Letter.
2) Open any Qt application (e.g. KWrite or Falkon).
3) Open a print dialog.
4) Behavior expected: Print dialog would default to Letter paper size and not A4.

[Regression Potential]
Two possibilities for regressions that I can imagine are:
- crashes because something is not defined;
- wrong default paper size (A4 wanted but CUPS returns something else).

[Additional Information]
The issue also affects other print settings, e.g. margins, though the aforementioned patch does not deal with these. A similar issue regarding the duplex setting was reported as Launchpad bug 1776173, and subsequently fixed, but other print settings continue to cause problems.

Software versions:
lsb_release: Ubuntu 18.04.3 LTS
libqt5core5a: 5.9.5+dfsg-0ubuntu2.3
Kernel: 5.0.0-25-generic

summary: - Qt print dialog does not remember page size
+ Qt print dialog has wrong default page size
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

The fix is included in Qt 5.11, so I am marking it as affecting only Bionic.

Changed in qtbase-opensource-src (Ubuntu):
status: New → Fix Released
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Can you please test the packages in https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3833?

The patch did not apply to 5.9 branch so I had to make some changes to it.

Revision history for this message
Maciej Puzio (maciej-puzio) wrote :

I can confirm that the patch fixes the problem, i.e. Qt print dialog now defaults to page size as set in System Settings Printers applet. To apply the fix, it was enough to add the PPA repository, upgrade libqt5printsupport5 package, and then close and reopen applications that were affected by the bug.
Thank you very much for your work.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Thanks for the quick feedback!

I have just uploaded this fix to Ubuntu, it is waiting in the review queue. Per the procedure, when it is accepted you will be asked to test the fix again, this time installing the packages from bionic-proposed repository.

Also updated the bug description to contain the needed fields for stable release procedure.

description: updated
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Normally, as this is not really a high-impact bug, I would be a bit reluctant to accept it as an SRU. Since every SRU introduces risks, especially if it's in a big core package like qtbase. But since I see there's activity here (and testers available) + the patch is rather straightforward, then oh well, why not give it a chance.

Changed in qtbase-opensource-src (Ubuntu Bionic):
status: New → Fix Committed
tags: added: verification-needed verification-needed-bionic
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello Maciej, or anyone else affected,

Accepted qtbase-opensource-src into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/qtbase-opensource-src/5.9.5+dfsg-0ubuntu2.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Ubuntu SRU Bot (ubuntu-sru-bot) wrote : Autopkgtest regression report (qtbase-opensource-src/5.9.5+dfsg-0ubuntu2.4)

All autopkgtests for the newly accepted qtbase-opensource-src (5.9.5+dfsg-0ubuntu2.4) for bionic have finished running.
The following regressions have been reported in tests triggered by the package:

kcoreaddons/unknown (armhf)
killbots/unknown (armhf)
kfind/unknown (armhf)
libkf5mailimporter/unknown (armhf)
kcrash/5.44.0-0ubuntu1 (armhf)
khtml/5.44.0-0ubuntu1 (armhf)
pinentry/1.1.0-1 (amd64)
ksystemlog/4:17.12.3-0ubuntu1 (armhf)
kdepim-runtime/4:17.12.3-0ubuntu2 (armhf)
kf5-messagelib/4:17.12.3-0ubuntu3 (arm64)

Please visit the excuses page listed below and investigate the failures, proceeding afterwards as per the StableReleaseUpdates policy regarding autopkgtest regressions [1].

https://people.canonical.com/~ubuntu-archive/proposed-migration/bionic/update_excuses.html#qtbase-opensource-src

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Autopkgtest_Regressions

Thank you!

Revision history for this message
Maciej Puzio (maciej-puzio) wrote :

Łukasz, thank you very much for accepting the package into bionic-proposed. I confirm that the updated binary package libqt5printsupport5 fixes the problem. I also updated other libqt5* packages available in bionic-proposed, and did not notice any obvious regressions.

However, I would like to voice my differing opinion on the importance of this bug. While this is perhaps not a high-impact bug in the meaning that it does not impact system stability or security, it is nonetheless one of the "infuriating little bugs" that significantly degrade user experience. For the user who does not remember to dig into prefs to change paper size before every print job, the bug results in the necessity of printing everything twice, as the first copy (A4 on Letter) has top and bottom lines clipped and missing, rendering the printout unusable. This bug, coupled with similar ones and the general instability of KDE desktop, makes Kubuntu 18.04 unsuitable as a desktop OS for everyday use, in my opinion. Because of that I am very grateful that this bug is getting fixed.

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

I have retried the tests, and now the only failing one is pinentry. But it has passed only once, and that was by accident. Please ignore it:

http://autopkgtest.ubuntu.com/packages/p/pinentry/bionic/amd64

tags: added: verification-done
removed: verification-needed
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for qtbase-opensource-src has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qtbase-opensource-src - 5.9.5+dfsg-0ubuntu2.4

---------------
qtbase-opensource-src (5.9.5+dfsg-0ubuntu2.4) bionic; urgency=medium

  * Fix default paper size in the print dialog (LP: #1846821).

 -- Dmitry Shachnev <email address hidden> Thu, 31 Oct 2019 00:00:50 +0300

Changed in qtbase-opensource-src (Ubuntu Bionic):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.