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

QLocale().uiLanguages() returns empty list on Android 6.x

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.12.6
    • Fix Version/s: 5.14.2, 5.15.0 Alpha
    • Component/s: Core: Locales (i18n)
    • Labels:
      None
    • Environment:
      Android 6.x. Other android versions and other OSes seem to work.
    • Platform/s:
      Android
    • Commits:
      0b28f1e3bae10def59e7fe8afac29ed5355a3f1e (qt/qtbase/5.14)

      Description

      Calling

      QLocale().uiLanguages()

      doesn't work as expected on Android 6.x where is always return an empty list. The same bug also happens when using the QML version:

      Qt.locale().uiLanguages

      The main effect is that calling the load method of a QTranslator passing a QLocale() as first argument simply doesn't work, and apps are not translated.

       

      I attach a simple test app reproducing the issue.

       

      Result on x86 Android emulator with android 6.0

       

      Same apk on Android 9.0, works properly.

        Attachments

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

          Activity

            People

            Assignee:
            andysh Andy Shaw
            Reporter:
            xalioth Fabien Chéreau
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes