diff options
author | Ghostkeeper <rubend@tutanota.com> | 2022-07-29 11:30:25 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2022-07-29 11:30:25 +0300 |
commit | d27ed71518c605da627c4bcc1266f44ac86b8dde (patch) | |
tree | f6228e5c9d73b72a709479ab0b3b7670e686fe46 | |
parent | fdad2590da99126ab7ba0e684bbb9888e55107b9 (diff) |
Increase maximum integer length to 12 characters
This may cause overflows if the integer type is 32-bit, but we tend to use 64-bit anyway. And 9,999,999 was already an overflow too.
Fixes #12859.
-rw-r--r-- | resources/qml/Settings/SettingTextField.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/resources/qml/Settings/SettingTextField.qml b/resources/qml/Settings/SettingTextField.qml index f0e3b2cacb..4e72bca93e 100644 --- a/resources/qml/Settings/SettingTextField.qml +++ b/resources/qml/Settings/SettingTextField.qml @@ -153,13 +153,13 @@ SettingItem selectionColor: UM.Theme.getColor("text_selection") selectByMouse: true - maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 10 + maximumLength: (definition.type == "str" || definition.type == "[int]") ? -1 : 12 // Since [int] & str don't have a max length, they need to be clipped (since clipping is expensive, this // should be done as little as possible) clip: definition.type == "str" || definition.type == "[int]" - validator: RegularExpressionValidator { regularExpression: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,9}\s*,)*(\s*-?[0-9]{0,9})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,10}$/ : (definition.type == "float") ? /^-?[0-9]{0,9}[.,]?[0-9]{0,3}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry + validator: RegularExpressionValidator { regularExpression: (definition.type == "[int]") ? /^\[?(\s*-?[0-9]{0,11}\s*,)*(\s*-?[0-9]{0,11})\s*\]?$/ : (definition.type == "int") ? /^-?[0-9]{0,12}$/ : (definition.type == "float") ? /^-?[0-9]{0,11}[.,]?[0-9]{0,3}$/ : /^.*$/ } // definition.type property from parent loader used to disallow fractional number entry Binding { |