Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.6, 6.5
-
None
-
-
13
-
67129ef9c (dev), f10777374 (dev)
Description
QIntValidator::validate() doesn't verify sanity of grouping separators.
One of its tests, tst_QIntValidator::validateFrench(), starts by verifying that "1 " is Acceptable, wherein the space is interpreted as a grouping character.
However, this should be Intermediate since it is not a well-formed numeric representation, although it is a legitimate prefix of valid input.
The design of the internal API between the validators and QLocale is unfortunately bad at handling this; QLocalePrivate's methods just return a bool rather than a validator state, or equivalent, so validateChars() or numberToCLocale() cannot tell its caller about the intermediate state. This API should be changed to support the validators better.
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-111371 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
467550,8 | QLocaleData: change validateChars() to return validation State | dev | qt/qtbase | Status: MERGED | +2 | 0 |
467551,5 | QValidator: return State::Intermediate for certain trailing characters | dev | qt/qtbase | Status: MERGED | +2 | 0 |