[Development] std::chrono getters in our API

Thiago Macieira thiago.macieira at intel.com
Fri Jun 17 23:40:24 CEST 2016

On sexta-feira, 17 de junho de 2016 15:54:28 PDT Matthew Woehlke wrote:
> > So, you're suggesting not doing anything now, leave std::chrono support
> > out in Qt 5, and do it only for Qt 6?
> I'm suggesting that a possible solution to the problem is to return a
> single complex type┬╣ that can be converted - perhaps implicitly - into
> the desired simple types (e.g. int milliseconds, std::chrono types). I
> wouldn't go so far as to claim that as the *best* solution :-).
> (┬╣ Or, the appropriate of several such types, as needed.)

First of all, returning complex types that cast to the right value doesn't 
work for people using auto. You'd be storing this intermediate type instead of 
the correct one.

Second, it can't be done in Qt 5 for QTimer. I'd rather not create difference 
between QTimer and QDeadlineTimer: the API should be the same. It's also 
unlikely we'll change it in Qt 6.

Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

More information about the Development mailing list