From 7a377fe3798bc33342c413a2db4af9994565a511 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Tue, 3 Feb 2015 12:44:47 +0100 Subject: QDialog: don't tell native dialog to hide if never shown If the platform returns false when asked to show a native dialog, it means that it could not show it. Calling hide on it later is therefore wrong, and can cause unwanted side effects. Change-Id: Icf5bdb5d98f40af6ef70fdbeaff824a535a404b3 Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/qdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 6de3ff8c15..c074411e26 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -127,7 +127,7 @@ bool QDialogPrivate::setNativeDialogVisible(bool visible) Q_Q(QDialog); helperPrepareShow(helper); nativeDialogInUse = helper->show(q->windowFlags(), q->windowModality(), parentWindow()); - } else { + } else if (nativeDialogInUse) { helper->hide(); } } -- cgit v1.2.3