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

QLocale::nativeCountryName does not use country information from locale object

XMLWordPrintable

    • Windows
    • qtbase/34d3f2e21921a7eef8f6241a178598f9eaf0a8a9 (5.15) qtbase/55e16b25f52fdd1b945d3f94d79ce85d88cb69ec (dev) qtbase/28bc3ca8114033a5542e7877105de4f7ec62bf83 (5.15) qtbase/e69b81101c6e09d1c1b81d50ea868a8625c9f248 (dev)

      When creating a Locale object and querying the function nativeCountryName it seems to use the language of the locale to choose the country name result.

      for example

      QLocale tempLocale(QLocale::Dutch, QLocale::UnitedKingdom);

      QString countryName = tempLocale.nativeCountryName();

      This will always result in "Nederland" regardless of the country I use, but this relates only to the language not the country.

      To make matters worse the static function:

      QString QLocale::countryToString(QLocale::Country country)

      for me always returns only the english name regardless of default locale setting and system locale.

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

            Eddy Edward Welbourne
            dave-hedon Dave Spitzer
            Maurice Kalinowski Maurice Kalinowski
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes