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

QTimeZone::hasTransisions() may be misleading

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Reported
    • Priority: P3: Somewhat important
    • Resolution: Unresolved
    • Affects Version/s: 5.15, 6.2
    • Fix Version/s: None
    • Component/s: Core: Date/Time
    • Labels:
      None
    • Platform/s:
      All

      Description

      It's documented to report whether the system zone backend supports looking up transitions.
      However, QTimeZone's instantiation can use a QUtcTimeZonePrivate backend, whose hasTransitions(), inherited from QTimeZonePrivate, returns false.
      So the actual implementation of QTimeZone::hasTransitions() reports on whether the instance it's called on uses a backend that supports transitions.
      That's a documentation issue.

      Meanwhile, for anyone who hasn't read the documentation, the name hasTransitions() might reasonably lead folk to suppose it's a test of whether the zone itself has any transitions, as well as its backend supporting them. We could perhaps add a zoneHasTransitions() method to fill that niche.

        Attachments

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

          Activity

            People

            Assignee:
            Eddy Edward Welbourne
            Reporter:
            Eddy Edward Welbourne
            PM Owner:
            Vladimir Minenko Vladimir Minenko
            RnD Owner:
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes