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);