summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-08-11 22:21:51 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-08-18 17:01:28 +0200
commitd8952690c75f83388e2b24f1b0f76266a58552e9 (patch)
treeb636e7c85dd267bfe68de9a8a3113056447a3af0
parent5c7e600b412dbd660be4e57663c6037064cf2a30 (diff)
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>
-rw-r--r--src/gui/kernel/qplatformdialoghelper.h4
-rw-r--r--src/widgets/dialogs/qmessagebox.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h
index 150a2333c1..1f8a7ec0a9 100644
--- a/src/gui/kernel/qplatformdialoghelper.h
+++ b/src/gui/kernel/qplatformdialoghelper.h
@@ -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);
diff --git a/src/widgets/dialogs/qmessagebox.h b/src/widgets/dialogs/qmessagebox.h
index 91fccd0d25..3498fb29c9 100644
--- a/src/widgets/dialogs/qmessagebox.h
+++ b/src/widgets/dialogs/qmessagebox.h
@@ -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)