Change QMessageBox::question to default to yes/no buttons instead of ok

Beside that it also removes a suggestion about making Ok==Yes and
No==Cancel. It would be a problem since we (at least)
can have messageboxes with both yes, no and cancel.

Change-Id: I567979b2e697e7103968d6512fe4835f86888ca3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
This commit is contained in:
Thorbjørn Lund Martsum 2012-01-07 08:23:17 +01:00 committed by Qt by Nokia
parent 4ed85ba43f
commit 5ff1a76a53
2 changed files with 8 additions and 3 deletions

7
dist/changes-5.0.0 vendored
View File

@ -364,3 +364,10 @@ Qt for Windows CE
construction would not be affected by the QPointer, but now that QPointer construction would not be affected by the QPointer, but now that QPointer
is implemented using QWeakPoiner, constructing the QSharedPointer will is implemented using QWeakPoiner, constructing the QSharedPointer will
cause an abort(). cause an abort().
- QMessageBox
* The static function QMessageBox::question has changed the default argument
for buttons. Before the default was to have an Ok button. That is changed
to having a yes and a no button.

View File

@ -191,10 +191,8 @@ public:
static StandardButton information(QWidget *parent, const QString &title, static StandardButton information(QWidget *parent, const QString &title,
const QString &text, StandardButtons buttons = Ok, const QString &text, StandardButtons buttons = Ok,
StandardButton defaultButton = NoButton); StandardButton defaultButton = NoButton);
// ### Qt 5: Replace Ok with Yes|No in question() function.
// Also consider if Ok == Yes and Cancel == No.
static StandardButton question(QWidget *parent, const QString &title, static StandardButton question(QWidget *parent, const QString &title,
const QString &text, StandardButtons buttons = Ok, const QString &text, StandardButtons buttons = StandardButtons(Yes | No),
StandardButton defaultButton = NoButton); StandardButton defaultButton = NoButton);
static StandardButton warning(QWidget *parent, const QString &title, static StandardButton warning(QWidget *parent, const QString &title,
const QString &text, StandardButtons buttons = Ok, const QString &text, StandardButtons buttons = Ok,