mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-23 18:19:21 +01:00
citra_qt: Add length validation
This commit is contained in:
parent
5407ed8b5e
commit
dcaf4a8e83
@ -14,6 +14,8 @@ QtKeyboardValidator::QtKeyboardValidator(QtKeyboard* keyboard_) : keyboard(keybo
|
|||||||
|
|
||||||
QtKeyboardValidator::State QtKeyboardValidator::validate(QString& input, int& pos) const {
|
QtKeyboardValidator::State QtKeyboardValidator::validate(QString& input, int& pos) const {
|
||||||
if (keyboard->ValidateFilters(input.toStdString()) == Frontend::ValidationError::None) {
|
if (keyboard->ValidateFilters(input.toStdString()) == Frontend::ValidationError::None) {
|
||||||
|
if (input.size() > keyboard->config.max_text_length)
|
||||||
|
return State::Invalid;
|
||||||
return State::Acceptable;
|
return State::Acceptable;
|
||||||
} else {
|
} else {
|
||||||
return State::Invalid;
|
return State::Invalid;
|
||||||
|
Loading…
Reference in New Issue
Block a user