QMessageBox: leave the Option's underlying_type as the default, int
QFlags<Option> will anyway store the value in an `int`, so we gain nothing from choosing quint8 as the fixed type, except artificially limiting the number of possible future options to eight. Found in API-review. As a drive-by, put options one per line and add a trailing comma where possible. Pick-to: 6.6 Change-Id: I0ed588ea6c7912e50705af89c47e2cf7e2ee23a0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
5c7e600b41
commit
d8952690c7
@ -405,7 +405,9 @@ protected:
|
||||
|
||||
public:
|
||||
// Keep in sync with QMessageBox Option
|
||||
enum class Option : quint8 { DontUseNativeDialog = 0x00000001 };
|
||||
enum class Option {
|
||||
DontUseNativeDialog = 0x00000001,
|
||||
};
|
||||
Q_DECLARE_FLAGS(Options, Option);
|
||||
Q_FLAG(Options);
|
||||
|
||||
|
@ -34,7 +34,7 @@ class Q_WIDGETS_EXPORT QMessageBox : public QDialog
|
||||
Q_PROPERTY(Options options READ options WRITE setOptions)
|
||||
public:
|
||||
// Keep in sync with MessageBoxOption in qplatformdialoghelper.h
|
||||
enum class Option : quint8 {
|
||||
enum class Option {
|
||||
DontUseNativeDialog = 0x00000001
|
||||
};
|
||||
Q_FLAG(Option)
|
||||
|
Loading…
Reference in New Issue
Block a user