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

QLocale returns default locale for Android Service

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.11.1
    • Core: Locales (i18n)
    • None
    • * Qt 5.11.1
      * Android emulator, platform level 28
      * Android device, platform level 27
    • Android

    Description

      When querying for the default locale in a Android service using a default constructed locale (or QLocale::system(), the C-locale is always returned instead of the actual locale. This only happens for services, not for activities.

      Sample code:

      qWarning() << QLocale() << QLocale::system();
      

      Output when run from activity:

      09-03 18:03:57.202  ...: QLocale(German, Latin, Germany) QLocale(German, Latin, Germany)
      

      Output when run from service:

      09-03 18:03:57.105  ...: QLocale(C, Default, Default) QLocale(C, Default, Default)
      

      Attachments

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

        Activity

          People

            taipan BogDan Vatra
            SkyCoder Felix Barz
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes