Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
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