From fe37a38b4565c1e8536e972ce9bf406c639d7340 Mon Sep 17 00:00:00 2001 From: Marcus Tillmanns Date: Thu, 10 Oct 2024 08:50:09 +0200 Subject: [PATCH] Core: Make Terms And Conditions more explicit Renames the Buttons to "Accept" and "Decline" to make it more clear that the user is agreeing to the Terms and Conditions. Also make "Decline" the default button. Change-Id: I1d51f8fd80b9d1e0884fe6901d26f7dead78c236 Reviewed-by: Leena Miettinen Reviewed-by: Eike Ziller --- src/plugins/coreplugin/coreplugin.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/plugins/coreplugin/coreplugin.cpp b/src/plugins/coreplugin/coreplugin.cpp index a14c5c5d6d8..9b6e3beac8f 100644 --- a/src/plugins/coreplugin/coreplugin.cpp +++ b/src/plugins/coreplugin/coreplugin.cpp @@ -54,6 +54,7 @@ #include #include #include +#include #include #include @@ -174,8 +175,15 @@ static void initTAndCAcceptDialog() QDialog dialog(ICore::dialogParent()); dialog.setWindowTitle(Tr::tr("Terms and Conditions")); - QDialogButtonBox buttonBox( - QDialogButtonBox::StandardButton::Yes | QDialogButtonBox::StandardButton::No); + QDialogButtonBox buttonBox; + QPushButton *acceptButton + = buttonBox.addButton(Tr::tr("Accept"), QDialogButtonBox::ButtonRole::YesRole); + QPushButton *decline + = buttonBox.addButton(Tr::tr("Decline"), QDialogButtonBox::ButtonRole::NoRole); + acceptButton->setAutoDefault(false); + acceptButton->setDefault(false); + decline->setAutoDefault(true); + decline->setDefault(true); QObject::connect(&buttonBox, &QDialogButtonBox::accepted, &dialog, &QDialog::accept); QObject::connect(&buttonBox, &QDialogButtonBox::rejected, &dialog, &QDialog::reject);