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

Shouldn't QChar::digitValue() return -1 instead of zero when invalid ucs4 character was passed?

    XMLWordPrintable

Details

    • I96c4c2b042bad478b7c704669e7ea0d574d3b22f

    Description

      Following code is used in QChar::digitValue(), I think that 'return 0' should be changed to 'return -1', because zero has meaning that the character is a digit value.

      int QChar::digitValue(uint ucs4)
      {
      if (ucs4 > UNICODE_LAST_CODEPOINT)
      return 0;
      return qGetProp(ucs4)->digitValue;
      }

      Attachments

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

        Activity

          People

            ritt.ks Konstantin Ritt
            kobalicek.petr Petr Kobalicek
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes