summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlat9nq <lat9nq@gmail.com>2022-05-16 02:19:24 +0200
committerlat9nq <lat9nq@gmail.com>2022-05-16 20:44:01 +0200
commit5035df27c357d5807432aa0056cc4e428884d988 (patch)
tree97a7ed719b22c27913b2874029e80a10ae386680
parentmain: Use Common::U16StringFromBuffer (diff)
downloadyuzu-5035df27c357d5807432aa0056cc4e428884d988.tar
yuzu-5035df27c357d5807432aa0056cc4e428884d988.tar.gz
yuzu-5035df27c357d5807432aa0056cc4e428884d988.tar.bz2
yuzu-5035df27c357d5807432aa0056cc4e428884d988.tar.lz
yuzu-5035df27c357d5807432aa0056cc4e428884d988.tar.xz
yuzu-5035df27c357d5807432aa0056cc4e428884d988.tar.zst
yuzu-5035df27c357d5807432aa0056cc4e428884d988.zip
-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(
break;
}
- const auto& text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
- : ui->line_edit_osk->text();
- std::u16string text_s = Common::U16StringFromBuffer(text.utf16(), text.size());
+ const auto text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
+ : ui->line_edit_osk->text();
+ auto text_str = Common::U16StringFromBuffer(text.utf16(), text.size());
- emit SubmitNormalText(SwkbdResult::Ok, std::move(text_s), true);
+ emit SubmitNormalText(SwkbdResult::Ok, std::move(text_str), true);
break;
}
}
@@ -1119,11 +1119,11 @@ void QtSoftwareKeyboardDialog::NormalKeyboardButtonClicked(QPushButton* button)
}
if (button == ui->button_ok || button == ui->button_ok_shift || button == ui->button_ok_num) {
- const auto& text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
- : ui->line_edit_osk->text();
- std::u16string text_s = Common::U16StringFromBuffer(text.utf16(), text.size());
+ const auto text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
+ : ui->line_edit_osk->text();
+ auto text_str = Common::U16StringFromBuffer(text.utf16(), text.size());
- emit SubmitNormalText(SwkbdResult::Ok, std::move(text_s));
+ emit SubmitNormalText(SwkbdResult::Ok, std::move(text_str));
return;
}
@@ -1189,8 +1189,8 @@ void QtSoftwareKeyboardDialog::InlineKeyboardButtonClicked(QPushButton* button)
return;
}
- InlineTextInsertString(
- Common::U16StringFromBuffer(button->text().utf16(), button->text().size()));
+ const auto button_text = button->text();
+ InlineTextInsertString(Common::U16StringFromBuffer(button_text.utf16(), button_text.size()));
// Revert the keyboard to lowercase if the shift key is active.
if (bottom_osk_index == BottomOSKIndex::UpperCase && !caps_lock_enabled) {
@@ -1283,11 +1283,11 @@ void QtSoftwareKeyboardDialog::TranslateButtonPress(Core::HID::NpadButton button
if (is_inline) {
emit SubmitInlineText(SwkbdReplyType::DecidedCancel, current_text, cursor_position);
} else {
- const auto& text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
- : ui->line_edit_osk->text();
- std::u16string text_s = Common::U16StringFromBuffer(text.utf16(), text.size());
+ const auto text = ui->topOSK->currentIndex() == 1 ? ui->text_edit_osk->toPlainText()
+ : ui->line_edit_osk->text();
+ auto text_str = Common::U16StringFromBuffer(text.utf16(), text.size());
- emit SubmitNormalText(SwkbdResult::Cancel, std::move(text_s));
+ emit SubmitNormalText(SwkbdResult::Cancel, std::move(text_str));
}
break;
case Core::HID::NpadButton::Y: