summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/yuzu/applets/qt_software_keyboard.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/yuzu/applets/qt_software_keyboard.cpp b/src/yuzu/applets/qt_software_keyboard.cpp
index 135e06085..e8b217d90 100644
--- a/src/yuzu/applets/qt_software_keyboard.cpp
+++ b/src/yuzu/applets/qt_software_keyboard.cpp
@@ -411,11 +411,11 @@ void QtSoftwareKeyboardDialog::ShowTextCheckDialog(
411 break; 411 break;
412 } 412 }
413 413
414 const auto& text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText() 414 const auto text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
415 : ui->line_edit_osk->text(); 415 : ui->line_edit_osk->text();
416 std::u16string text_s = Common::U16StringFromBuffer(text.utf16(), text.size()); 416 auto text_str = Common::U16StringFromBuffer(text.utf16(), text.size());
417 417
418 emit SubmitNormalText(SwkbdResult::Ok, std::move(text_s), true); 418 emit SubmitNormalText(SwkbdResult::Ok, std::move(text_str), true);
419 break; 419 break;
420 } 420 }
421 } 421 }
@@ -1119,11 +1119,11 @@ void QtSoftwareKeyboardDialog::NormalKeyboardButtonClicked(QPushButton* button)
1119 } 1119 }
1120 1120
1121 if (button == ui->button_ok || button == ui->button_ok_shift || button == ui->button_ok_num) { 1121 if (button == ui->button_ok || button == ui->button_ok_shift || button == ui->button_ok_num) {
1122 const auto& text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText() 1122 const auto text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
1123 : ui->line_edit_osk->text(); 1123 : ui->line_edit_osk->text();
1124 std::u16string text_s = Common::U16StringFromBuffer(text.utf16(), text.size()); 1124 auto text_str = Common::U16StringFromBuffer(text.utf16(), text.size());
1125 1125
1126 emit SubmitNormalText(SwkbdResult::Ok, std::move(text_s)); 1126 emit SubmitNormalText(SwkbdResult::Ok, std::move(text_str));
1127 return; 1127 return;
1128 } 1128 }
1129 1129
@@ -1189,8 +1189,8 @@ void QtSoftwareKeyboardDialog::InlineKeyboardButtonClicked(QPushButton* button)
1189 return; 1189 return;
1190 } 1190 }
1191 1191
1192 InlineTextInsertString( 1192 const auto button_text = button->text();
1193 Common::U16StringFromBuffer(button->text().utf16(), button->text().size())); 1193 InlineTextInsertString(Common::U16StringFromBuffer(button_text.utf16(), button_text.size()));
1194 1194
1195 // Revert the keyboard to lowercase if the shift key is active. 1195 // Revert the keyboard to lowercase if the shift key is active.
1196 if (bottom_osk_index == BottomOSKIndex::UpperCase && !caps_lock_enabled) { 1196 if (bottom_osk_index == BottomOSKIndex::UpperCase && !caps_lock_enabled) {
@@ -1283,11 +1283,11 @@ void QtSoftwareKeyboardDialog::TranslateButtonPress(Core::HID::NpadButton button
1283 if (is_inline) { 1283 if (is_inline) {
1284 emit SubmitInlineText(SwkbdReplyType::DecidedCancel, current_text, cursor_position); 1284 emit SubmitInlineText(SwkbdReplyType::DecidedCancel, current_text, cursor_position);
1285 } else { 1285 } else {
1286 const auto& text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText() 1286 const auto text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
1287 : ui->line_edit_osk->text(); 1287 : ui->line_edit_osk->text();
1288 std::u16string text_s = Common::U16StringFromBuffer(text.utf16(), text.size()); 1288 auto text_str = Common::U16StringFromBuffer(text.utf16(), text.size());
1289 1289
1290 emit SubmitNormalText(SwkbdResult::Cancel, std::move(text_s)); 1290 emit SubmitNormalText(SwkbdResult::Cancel, std::move(text_str));
1291 } 1291 }
1292 break; 1292 break;
1293 case Core::HID::NpadButton::Y: 1293 case Core::HID::NpadButton::Y: