diff options
author | Samuel Gaist <samuel.gaist@edeltech.ch> | 2016-08-29 09:59:46 +0200 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2017-02-07 09:09:42 +0000 |
commit | 8b1d9d308b1f31e1b9c817e0d91e14baa3b76d6b (patch) | |
tree | 543808bd6248fcd83856aed02efe27018efaaa2b /src/widgets/dialogs | |
parent | d0b8356e7efcb546bf8838b01b94840e4c0d3ab3 (diff) |
Fix result handling in QDialog::done
The setData method of an item view would get an incorrect value of a
QDialog's result. This patch changes the order of functions called to
fix that.
[ChangeLog][QtWidgets][QDialog] Fixed a bug where accessing the result
of QDialog's result could yield an incorrect value in some situation
like using it as a delegate for item views.
Task-number: QTBUG-6018
Task-number: QTBUG-12156
Task-number: QTBUG-14430
Change-Id: I6ee4b6e8cacf6a806631c05c6c5dbcff925df65e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qdialog.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index e8883df527..e5715ecd57 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -557,8 +557,8 @@ int QDialog::exec() void QDialog::done(int r) { Q_D(QDialog); - hide(); setResult(r); + hide(); d->close_helper(QWidgetPrivate::CloseNoEvent); d->resetModalitySetByOpen(); |