diff options
author | Friedemann Kleint <Friedemann.Kleint@digia.com> | 2014-06-04 13:42:00 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-04 14:43:02 +0200 |
commit | a149d2f73ec45084c589ef4211974ba50c0d4631 (patch) | |
tree | 932112c46bd99c8d32cb1bbecff827759ce17f95 /src/widgets/dialogs/qmessagebox.cpp | |
parent | 91b0b2e1a7566dda00ec24e674784e4ccc99fea6 (diff) |
Do not clear default button in QMessageBox::setDetailedText().
Store the value of QMessageBoxPrivate::autoAddOkButton
temporarily when automatically adding the "Show Details..."
button.
Task-number: QTBUG-39334
Change-Id: I173c83893548ee83b3d8ea2743f87686c32657e7
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets/dialogs/qmessagebox.cpp')
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index dcddc693c8..3350a926f0 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -2565,8 +2565,10 @@ void QMessageBox::setDetailedText(const QString &text) d->detailsText->hide(); } if (!d->detailsButton) { + const bool autoAddOkButton = d->autoAddOkButton; // QTBUG-39334, addButton() clears the flag. d->detailsButton = new DetailButton(this); addButton(d->detailsButton, QMessageBox::ActionRole); + d->autoAddOkButton = autoAddOkButton; } d->detailsText->setText(text); } |