Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-111371

QIntValidator::validate() deems a trailing grouping character Acceptable

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.6, 6.5
    • Core: Locales (i18n)
    • None
    • All
    • 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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            ahmad.samir Ahmad Samir
            Eddy Edward Welbourne
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes