summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-02-03 12:44:47 +0100
committerRichard Moe Gustavsen <richard.gustavsen@theqtcompany.com>2015-02-04 15:05:15 +0000
commit7a377fe3798bc33342c413a2db4af9994565a511 (patch)
tree83c3f6befa085d154da083a9a0bd59a3cf603765 /src/widgets/dialogs
parent7d6c6bc082dc4c93078c5803f0b6cc536474b9b1 (diff)
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 <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qdialog.cpp2
1 files changed, 1 insertions, 1 deletions
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();
}
}