summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs/qfontdialog.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-10-20 18:33:05 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-10-23 19:42:46 +0200
commit92194ac571cb70c796101d1daa2e4bed214a439b (patch)
tree560f633114665216cdc52c5bd973b5de48274047 /src/widgets/dialogs/qfontdialog.cpp
parentc0f13eeb99e58c71c685d4c2d2932f300d69fb26 (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 <richard.gustavsen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/widgets/dialogs/qfontdialog.cpp')
-rw-r--r--src/widgets/dialogs/qfontdialog.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qfontdialog.cpp b/src/widgets/dialogs/qfontdialog.cpp
index edea842def..bb1619cb1f 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) {