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

QCollatorSortKey doesn't work on macOS

XMLWordPrintable

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

      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) {

        For Gerrit Dashboard: QTBUG-67490
        # Subject Branch Project Status CR V

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

              Created:
              Updated: