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

Disentangle datestring and textdate features

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • 6.0
    • 5.12.0, 5.15.0
    • Core: Date/Time
    • None
    • All
    • 45967dfbd8192a14a324a75377d1860891845fbf

    Description

      Qt's public date/time APIs have some deprecated parts dependent on feature textdate and some other parts dependent on feature datestring. One of datestring's string format options is Qt::TextDate; some (but not all) implementations of datestring APIs have their Qt::TextDate parts #if-ed on the textdate feature; but the qnamespace.h declaration of Qt::TextDate isn't conditioned on textdate. Indeed qnamespace.qdoc describes Qt::TextDate as "The default Qt format" and various datestring functions take it as their default value for a Qt::DateFormat variable. Because some implementations depend on textdate, datestring is declared in corelib/configure.json to depend on textdate.

      The two features are both public. They describe themselves as:

      • textdate - Supports month and day names in dates.
      • datestring - Provides conversion between dates and strings.

      I propose that, when textdate is disabled, datestring's APIs treat Qt::TextDate as Qt::ISODate; with this change, datestring is decoupled from (i.e. can be enabled without) textdate. This can pave the way for making textdate entirely optional. It only changes API or ABI compatibility when datestring is enabled without textdate, which was not possible before this change.

      Open questions (assign to me once answered):

      • Any objections to this plan ?
      • Which branch ?

      Attachments

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

        Activity

          People

            thiago Thiago Macieira
            Eddy Edward Welbourne
            Maurice Kalinowski Maurice Kalinowski
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes