printing: Make sure window modality works with native print dialogs
authorBradley T. Hughes <bradley.hughes@nokia.com>
Fri, 30 Mar 2012 08:01:14 +0000 (10:01 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 4 Apr 2012 09:56:57 +0000 (11:56 +0200)
commitf7674d812222d03f937bec55e54c55eb51e1e6e1
tree25d5be5fd170a0d2d909f26211d89864b70ee26b
parent3867641d78809cf81370b52c74d6cfadc7e32629
printing: Make sure window modality works with native print dialogs

Make the native QPrintDialogs and QPageSetupDialogs participate in the
Qt modality system. Even though we are overriding QDialog::setVisible()
and exec() to show the native dialgos, we want to still call into
QDialog::setVisible() so that modality state and events are properly
handled. We do this by setting the WA_DontShowOnScreen attribute on
QPrintDialog and QPageSetupDialog, and call QDialog::setVisible() at the
appropriate places.

Change-Id: I7d800790c40ba1f467c3315e29abb79a7fa0eb34
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/printsupport/dialogs/qpagesetupdialog_mac.mm
src/printsupport/dialogs/qpagesetupdialog_win.cpp
src/printsupport/dialogs/qprintdialog_mac.mm
src/printsupport/dialogs/qprintdialog_win.cpp