Details
-
Technical task
-
Resolution: Done
-
P2: Important
-
-
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 |
288244,7 | Reduce Qt Declarative's use of QDateTime's locale-dependent APIs | 5.15 | qt/qtdeclarative | Status: MERGED | +2 | 0 |