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

QDeadlineTimer should accept implicit construction from anything that implicitly converts to a chrono::duration

    XMLWordPrintable

Details

    Description

      We have at least one case (QSemaphore in Qt 6.6) where API that formerly took chrono::duration was ported to use QDeadlineTimer instead. This is SiC, because the old function accepted arguments that implicitly convert to a chrono::duration, while the new one does not.

      The SiC could be solved, if we can, by letting QDeadlineTimer accept not just any chrono::duration, but any type convertible to a chrono::duration. We implemented that for QAnyStringView, which accepts anything convertible to QString, but it's not clear whether this can be done for any chrono::duration template instantiation.

      Acceptance criteria:

      • find out whether it's possible to make QDeadlineTimer accept anything convertible to chrono::duration<Rep,Period> for arbitrary Rep and Period
      • if it can be done, do it
      • if not, discuss on ML whether all QDeadlineTimer functions should get a chrono::duration overload, too, or whether the SiC is acceptable

      Attachments

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

        Activity

          People

            cnn Qt Core & Network
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes