swkbd: Fix a bug where clicking Cancel hangs the game (#5294)
* swkbd: Fix a bug where clicking Cancel hangs the game The text is validated in `Finalize`. If the validation fails, an error is returned and the applet is not actually finalized. This can result in hangs. This is usually not a problem as the frontend is expected to validate the text passed to `Finalize`. However, when the user clicked on `Cancel`, the text is ignored and the frontend won't do any validation. Therefore, we should skip the validation here as well. Also fixed a potential data race. All these functions should now be called on the same thread * Address review comments Renamed the fields Remove close button
This commit is contained in:
@@ -62,6 +62,9 @@ private:
|
||||
|
||||
QWidget& parent;
|
||||
|
||||
std::string result_text;
|
||||
int result_button;
|
||||
|
||||
friend class QtKeyboardDialog;
|
||||
friend class QtKeyboardValidator;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user