Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-80441 Remove all locale-awareness from Q(Date|Time)+
  3. QTBUG-81631

Purge Qt Declarative's use of QDateTime's locale-dependent APIs

    XMLWordPrintable

Details

    • All
    • Qt6_Foundation_ Sprint 2, Qt6_Foundation_ Sprint 3, Qt6_Foundation_ Sprint 4, Qt6_Foundation_ Sprint 5, Qt6_Foundation_ Sprint 6, Qt6_Foundation_ Sprint 7, Qt6_Foundation_ Sprint 8
    • c5f78add12b7d33926631b6df79599df18f65068 (qt/qtdeclarative/5.15)

    Description

      QDateTime shall drop its support for locale-dependence and produce pure C-locale results at Qt 6 (see QTBUG-80441). All locale-dependence in date-time APIs should, thereafter, be mediated by use of QLocale, to which QDateTime has long delegated these conversions.
      As part of this I plan to deprecate the locale-specific enum members in Qt::DateFormat; at the very least, the QDateTime APIs shall stop supporting them.

      Unfortunately, Qt Declarative has its own uses of Qt::DateFormat, e.g. qtdeclarative/src/qml/qml/v8/qqmlbuiltinfunctions.cpp defines QtObject::method_formatDateTime() and related formatDate(), formatTime() methods; these interpret a format argument as Qt::DateFormat, which they then forward to QDateTime::toString().
      They shall, at the very least, need to replace this last call with a switch on Qt::DateFormat, that calls QLocale::toString() for the locale-dependent formats, or QDateTime::toString() for the others.

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            Eddy Edward Welbourne
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes