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

[REG 5.4.1 => 5.5.0] All Qt.inputMethod.locale properties return undefined

    XMLWordPrintable

Details

    • d1b20513798ed441afddb87fd4e7facce78349e1

    Description

      The following code prints valid properties like en_US with 5.4.1 and undefined with 5.5.0:

      import QtQuick 2.2
      import QtQuick.Window 2.0
      
      Window {
          id: window
          visible: true
          width: 800
          height: 600
      
          Component.onCompleted: {
              print(Qt.inputMethod.locale.amText);
              print(Qt.inputMethod.locale.decimalPoint);
              print(Qt.inputMethod.locale.exponential);
              print(Qt.inputMethod.locale.firstDayOfWeek);
              print(Qt.inputMethod.locale.groupSeparator);
              print(Qt.inputMethod.locale.measurementSystem);
              print(Qt.inputMethod.locale.name);
              print(Qt.inputMethod.locale.nativeCountryName);
              print(Qt.inputMethod.locale.nativeLanguageName);
              print(Qt.inputMethod.locale.negativeSign);
              print(Qt.inputMethod.locale.percent);
              print(Qt.inputMethod.locale.pmText);
              print(Qt.inputMethod.locale.positiveSign);
              print(Qt.inputMethod.locale.textDirection);
              print(Qt.inputMethod.locale.uiLanguages);
              print(Qt.inputMethod.locale.weekDays);
              print(Qt.inputMethod.locale.zeroDigit);
          }
      }
      

      The non-QML equivalent works fine:

      #include <QtGui>
      
      int main(int argc, char *argv[])
      {
          QGuiApplication a(argc, argv);
      
          qDebug() << a.inputMethod()->locale().name();
      
          return a.exec();
      }
      

      Attachments

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

        Activity

          People

            mitch_curtis Mitch Curtis
            mitch_curtis Mitch Curtis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes