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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.14.2, 5.15.0 Alpha
    • 5.12.6
    • Core: Locales (i18n)
    • None
    • Android 6.x. Other android versions and other OSes seem to work.
    • Android
    • 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

            andysh Andy Shaw
            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