From 85b0335c419118629b05b7c8891b844387382700 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 2 Sep 2020 11:32:13 +0200 Subject: Tighten up QDialogButtonBox::ButtonLayout enum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... and the equivalent enum in QPlatformDialogHelper. No need to keep numerical values the same anymore. Remove ### Qt 6 comment. Change-Id: Ib369ea6ca2362f6ab0f71a3a6c90c4adaa7f11cd Reviewed-by: Tor Arne Vestbø --- src/gui/kernel/qplatformdialoghelper.cpp | 10 ---------- src/gui/kernel/qplatformdialoghelper.h | 1 - src/widgets/widgets/qdialogbuttonbox.h | 3 +-- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp index e853fdbdcd..79fac81eed 100644 --- a/src/gui/kernel/qplatformdialoghelper.cpp +++ b/src/gui/kernel/qplatformdialoghelper.cpp @@ -107,11 +107,6 @@ static const int buttonRoleLayouts[2][6][14] = QPlatformDialogHelper::AcceptRole | QPlatformDialogHelper::Reverse, QPlatformDialogHelper::NoRole | QPlatformDialogHelper::Reverse, QPlatformDialogHelper::YesRole | QPlatformDialogHelper::Reverse, QPlatformDialogHelper::EOL }, - // MacModelessLayout - { QPlatformDialogHelper::ResetRole, QPlatformDialogHelper::ApplyRole, QPlatformDialogHelper::ActionRole, QPlatformDialogHelper::Stretch, - QPlatformDialogHelper::HelpRole, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, - QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL }, - // AndroidLayout (neutral, stretch, dismissive, affirmative) // https://material.io/guidelines/components/dialogs.html#dialogs-specs { QPlatformDialogHelper::HelpRole, QPlatformDialogHelper::ResetRole, QPlatformDialogHelper::ApplyRole, QPlatformDialogHelper::ActionRole, @@ -143,11 +138,6 @@ static const int buttonRoleLayouts[2][6][14] = QPlatformDialogHelper::AlternateRole, QPlatformDialogHelper::DestructiveRole, QPlatformDialogHelper::ApplyRole, QPlatformDialogHelper::ActionRole, QPlatformDialogHelper::Stretch, QPlatformDialogHelper::ResetRole, QPlatformDialogHelper::HelpRole, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL }, - // MacModelessLayout - { QPlatformDialogHelper::ActionRole, QPlatformDialogHelper::ApplyRole, QPlatformDialogHelper::ResetRole, QPlatformDialogHelper::Stretch, - QPlatformDialogHelper::HelpRole, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, - QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL, QPlatformDialogHelper::EOL }, - // AndroidLayout // (affirmative // dismissive diff --git a/src/gui/kernel/qplatformdialoghelper.h b/src/gui/kernel/qplatformdialoghelper.h index 59f01c9fc3..080b7c7473 100644 --- a/src/gui/kernel/qplatformdialoghelper.h +++ b/src/gui/kernel/qplatformdialoghelper.h @@ -150,7 +150,6 @@ public: MacLayout, KdeLayout, GnomeLayout, - MacModelessLayout, AndroidLayout }; Q_ENUM(ButtonLayout) diff --git a/src/widgets/widgets/qdialogbuttonbox.h b/src/widgets/widgets/qdialogbuttonbox.h index a9a1a3453d..46a1d616d7 100644 --- a/src/widgets/widgets/qdialogbuttonbox.h +++ b/src/widgets/widgets/qdialogbuttonbox.h @@ -113,8 +113,7 @@ public: MacLayout, KdeLayout, GnomeLayout, - // MacModelessLayout, - AndroidLayout = GnomeLayout + 2 // ### Qt 6: reorder + AndroidLayout }; QDialogButtonBox(QWidget *parent = nullptr); -- cgit v1.2.3