qt6-bb10/src/printsupport
Tor Arne Vestbø 73a11c9d6a Emit QPrintDialog::accepted(QPrinter*) before QDialog::finished
As part of d8bbb5ee0e the order of
QDialog::accepted/rejected and QDialog::finished was changed so
that the latter came last. This has been the behavior now for
the entire Qt 6 series.

QPrintDialog didn't pick up on this new behavior, and was emitting
the QPrintDialog::accepted(QPrinter*) signal after calling the
dialog's done() method, which resulted in emitting finished before
the QPrintDialog printer-specific accepted signal. Clients such as
the textedit example, who would "clean up" in finished() would then
crash when processing the accepted signal.

We now emit QPrintDialog::accepted(QPrinter*) at the same time as
the dialog's accepted signal. The natural place to do this would be
the QPrintDialog constructor, but that's spread out and duplicated
between all the platform specific print dialog implementations, so
we do it via a single shot connect instead in QPrintDialog::done.

[ChangeLog[Print support] QPrintDialog::accepted(QPrinter*) is now
emitted before QDialog::finished, in line with QDialog::accepted.

Pick-to: 6.7 6.5
Change-Id: Idade32b667bdf7b81845025b8d83f08a551d32bb
Reviewed-by: Axel Spoerl <axel.spoerl@qt.io>
2024-05-27 18:38:36 +02:00
..
dialogs Emit QPrintDialog::accepted(QPrinter*) before QDialog::finished 2024-05-27 18:38:36 +02:00
doc Correct doc snippet license 2024-02-28 19:15:51 +01:00
kernel Add -Wweak-vtables to headersclean 2024-05-19 15:56:17 +00:00
platform print: Clamp margins entered by the user in the page setup dialog 2024-04-25 14:22:30 +03:00
widgets Fix previewing a preview on reentrance 2024-03-01 21:16:56 +01:00
CMakeLists.txt Add -Wweak-vtables to headersclean 2024-05-19 15:56:17 +00:00
configure.cmake Fix build with -no-feature-lineedit 2023-03-04 09:45:21 +00:00
qt_cmdline.cmake