mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-20 18:45:45 +00:00
software_keyboard: Make GetText asynchronous
a
This commit is contained in:
parent
04bc2fafbc
commit
f0d2246b6a
9 changed files with 64 additions and 29 deletions
|
@ -207,7 +207,7 @@ GMainWindow::~GMainWindow() {
|
|||
delete render_window;
|
||||
}
|
||||
|
||||
std::optional<std::u16string> GMainWindow::SoftwareKeyboardGetText(
|
||||
void GMainWindow::SoftwareKeyboardGetText(
|
||||
const Core::Frontend::SoftwareKeyboardParameters& parameters) {
|
||||
QtSoftwareKeyboardDialog dialog(this, parameters);
|
||||
dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint |
|
||||
|
@ -216,9 +216,9 @@ std::optional<std::u16string> GMainWindow::SoftwareKeyboardGetText(
|
|||
dialog.exec();
|
||||
|
||||
if (!dialog.GetStatus())
|
||||
return std::nullopt;
|
||||
emit SoftwareKeyboardFinishedText(std::nullopt);
|
||||
|
||||
return dialog.GetText();
|
||||
emit SoftwareKeyboardFinishedText(dialog.GetText());
|
||||
}
|
||||
|
||||
void GMainWindow::SoftwareKeyboardInvokeCheckDialog(std::u16string error_message) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue