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

QCollatorSortKey doesn't work on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.10.1, 5.15.2
    • Core: Locales (i18n)
    • None
    • macOS

    Description

      QCollatorSortKey doesn't work for one character strings.  Problem is that in QCollator::sortKey() in qcollator_mac.cpp the status returned by UCGetCollationKey is kCollateBufferTooSmall and not kUCOutputBufferTooSmall. This was determined experimentally on a macOS 10.13.3 system. Changing the conditional to call UCGetCollationKey again if the initial buffer is too small to the following seems to fix the problem:

      if (status == kUCOutputBufferTooSmall || status == kCollateBufferTooSmall) {

      Attachments

        Issue Links

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

          Activity

            People

              thiago Thiago Macieira
              jpe John Ehresman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes