diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/applets/profile_select.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu/applets/software_keyboard.cpp | 14 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/yuzu/applets/profile_select.cpp b/src/yuzu/applets/profile_select.cpp index 730426c16..f95f7fe3c 100644 --- a/src/yuzu/applets/profile_select.cpp +++ b/src/yuzu/applets/profile_select.cpp | |||
| @@ -58,10 +58,7 @@ QtProfileSelectionDialog::QtProfileSelectionDialog(QWidget* parent) | |||
| 58 | 58 | ||
| 59 | scroll_area = new QScrollArea; | 59 | scroll_area = new QScrollArea; |
| 60 | 60 | ||
| 61 | buttons = new QDialogButtonBox; | 61 | buttons = new QDialogButtonBox(QDialogButtonBox::Cancel | QDialogButtonBox::Ok); |
| 62 | buttons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); | ||
| 63 | buttons->addButton(tr("OK"), QDialogButtonBox::AcceptRole); | ||
| 64 | |||
| 65 | connect(buttons, &QDialogButtonBox::accepted, this, &QtProfileSelectionDialog::accept); | 62 | connect(buttons, &QDialogButtonBox::accepted, this, &QtProfileSelectionDialog::accept); |
| 66 | connect(buttons, &QDialogButtonBox::rejected, this, &QtProfileSelectionDialog::reject); | 63 | connect(buttons, &QDialogButtonBox::rejected, this, &QtProfileSelectionDialog::reject); |
| 67 | 64 | ||
diff --git a/src/yuzu/applets/software_keyboard.cpp b/src/yuzu/applets/software_keyboard.cpp index eddc9c941..f3eb29b25 100644 --- a/src/yuzu/applets/software_keyboard.cpp +++ b/src/yuzu/applets/software_keyboard.cpp | |||
| @@ -75,13 +75,13 @@ QtSoftwareKeyboardDialog::QtSoftwareKeyboardDialog( | |||
| 75 | length_label->setText(QStringLiteral("%1/%2").arg(text.size()).arg(parameters.max_length)); | 75 | length_label->setText(QStringLiteral("%1/%2").arg(text.size()).arg(parameters.max_length)); |
| 76 | }); | 76 | }); |
| 77 | 77 | ||
| 78 | buttons = new QDialogButtonBox; | 78 | buttons = new QDialogButtonBox(QDialogButtonBox::Cancel); |
| 79 | buttons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); | 79 | if (parameters.submit_text.empty()) { |
| 80 | buttons->addButton(parameters.submit_text.empty() | 80 | buttons->addButton(QDialogButtonBox::Ok); |
| 81 | ? tr("OK") | 81 | } else { |
| 82 | : QString::fromStdU16String(parameters.submit_text), | 82 | buttons->addButton(QString::fromStdU16String(parameters.submit_text), |
| 83 | QDialogButtonBox::AcceptRole); | 83 | QDialogButtonBox::AcceptRole); |
| 84 | 84 | } | |
| 85 | connect(buttons, &QDialogButtonBox::accepted, this, &QtSoftwareKeyboardDialog::accept); | 85 | connect(buttons, &QDialogButtonBox::accepted, this, &QtSoftwareKeyboardDialog::accept); |
| 86 | connect(buttons, &QDialogButtonBox::rejected, this, &QtSoftwareKeyboardDialog::reject); | 86 | connect(buttons, &QDialogButtonBox::rejected, this, &QtSoftwareKeyboardDialog::reject); |
| 87 | layout->addWidget(header_label); | 87 | layout->addWidget(header_label); |