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 <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-10-10 08:50:09 +02:00
parent e61a59d8aa
commit fe37a38b45

View File

@@ -54,6 +54,7 @@
#include <QLabel>
#include <QMenu>
#include <QMessageBox>
#include <QPushButton>
#include <QUuid>
#include <cstdlib>
@@ -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);