From a82406eb27545af6b4f36d20f570be31cd940baf Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Mon, 1 Aug 2022 15:08:25 +0200 Subject: [PATCH] Utils: Add shortcut for buttons in environment dialog Task-number: QTCREATORBUG-27887 Change-Id: Ifb52d24354b1042cdb1ccb4ca898a251cbac1039 Reviewed-by: Reviewed-by: Christian Stenger --- src/libs/utils/namevaluesdialog.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/libs/utils/namevaluesdialog.cpp b/src/libs/utils/namevaluesdialog.cpp index 0b8de22e6c8..cdd373d8fe4 100644 --- a/src/libs/utils/namevaluesdialog.cpp +++ b/src/libs/utils/namevaluesdialog.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -95,6 +96,8 @@ NameValuesDialog::NameValuesDialog(const QString &windowTitle, const QString &he auto box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this); + box->button(QDialogButtonBox::Ok)->setText(tr("&Ok")); + box->button(QDialogButtonBox::Cancel)->setText(tr("&Cancel")); connect(box, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(box, &QDialogButtonBox::rejected, this, &QDialog::reject);