diff options
| author | Tor Arne Vestbø <[email protected]> | 2023-10-20 18:33:05 +0200 | 
|---|---|---|
| committer | Tor Arne Vestbø <[email protected]> | 2023-10-23 19:42:46 +0200 | 
| commit | 92194ac571cb70c796101d1daa2e4bed214a439b (patch) | |
| tree | 560f633114665216cdc52c5bd973b5de48274047 /src/widgets/dialogs/qfontdialog.cpp | |
| parent | c0f13eeb99e58c71c685d4c2d2932f300d69fb26 (diff) | |
Unify QDialog WA_WState_ExplicitShowHide handling
Instead of checking it inside QDialogPrivate::setVisible and its
overrides, we can check it in QDialog::setVisible, up front.
The logic in QDialogPrivate::setVisible related to modality that
was executed prior to the WA_WState_ExplicitShowHide is now skipped
in the case the WA_WState_ExplicitShowHide condition hits, but this
makes sense as the modality logic has a second part at the end
of the function, restoring the modality, and this part was never
executed as the code was prior to this change.
Change-Id: I9580e91dbc5a981c83538d765b86138afee44f14
Reviewed-by: Richard Moe Gustavsen <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Diffstat (limited to 'src/widgets/dialogs/qfontdialog.cpp')
| -rw-r--r-- | src/widgets/dialogs/qfontdialog.cpp | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp index edea842def7..bb1619cb1fb 100644 --- a/src/widgets/dialogs/qfontdialog.cpp +++ b/src/widgets/dialogs/qfontdialog.cpp @@ -974,8 +974,7 @@ void QFontDialog::setVisible(bool visible)  void QFontDialogPrivate::setVisible(bool visible)  {      Q_Q(QFontDialog); -    if (q->testAttribute(Qt::WA_WState_ExplicitShowHide) && q->testAttribute(Qt::WA_WState_Hidden) != visible) -        return; +      if (canBeNativeDialog())          setNativeDialogVisible(visible);      if (nativeDialogInUse) {  | 
