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>
This commit is contained in:
parent
7d6c6bc082
commit
7a377fe379
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user