[Development] QTimer::setInterval() and <chrono>

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Thu Dec 7 10:37:48 CET 2017

Il 07/12/2017 09:19, Christian Ehrlicher ha scritto:
>  From my pov <chrono> is a c++11 feature and since Qt5.9 needs c++11 the 
> include gueard is superfluous. But I don't know if there is a supported 
> platform which is still supported and chrono is not available...
> If the include guard is superflouos, I can create a patch.
> btw: the same goeas for qmutex.h and qobject.h

Although in general Qt > 5.6 requires C++11, we don't require _complete 
C++11 support_ from the compiler, in order to support as many platforms 
as possible. We don't (and cannot) use certain language features; some 
language feature needs protection via #ifdefs and other macros; and we 
unconditionally require minimal support from the Standard Library (as of 
now, I think, only containers, <new>, <type_traits>).

Support for <chrono> from the Standard Library is one of the things that 
Qt includes conditionally. I'm not sure which platform we want to 
support doesn't have it yet (QNX? maybe osX?), and since we don't want 
to drop that platform, we protect the inclusion. Yes, this also means 
you need to upgrade your compiler to support the has_include mechanism. 
(Or, patch your local version of Qt...)

Hope this helps,

Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908
KDAB - Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4007 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20171207/300a12ab/attachment.bin>

More information about the Development mailing list