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

qcontactsortorder test is locale-dependent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.x
    • PIM: Contacts
    • None
    • All

    Description

      The qcontactsortorder unit test checks different sorting orders of QContact s based on their notes. QString-based details like notes are compared via QString::localeAwareCompare() and the resulting order is thus highly dependent on both platform and current locale and which thus not always match the expectations outlined in src/contacts/qcontactmanagerengine.cpp.
      For example, the tests checking the ascending or descending cases-sensitive sort order currently fail when using the C.UTF-8 locale on Debian unstable (see the attached build log).

      I'm not sure what a good solution would be, I suppose QMake could set LC_ALL to a widely used locale which matches the current expectations of the unit test like en_US.UTF-8, but that isn't guaranteed to exist in a build environment and locale names are not standardized or platform-independent.

      Attachments

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

        Activity

          People

            chrisadams Christopher Adams
            gber gber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes