Re: [Development] QTimer::setInterval() and
On Thursday, 7 December 2017 09:22:12 PST Christian Ehrlicher wrote: > Am 07.12.2017 um 17:01 schrieb Thiago Macieira: > > So you upgrade your compiler. > > No problem from my side :) > > > See also how no version of Visual Studio has __has_include, so the > > functionality is disabled with Microsoft's compiler until they implement > > the macro. > > > > This is a conscious decision. > > Then it's even more important to document that those functions are not > available for compilers which do not support __has_include. > Really hoped this was just a leftover from pre c++11 times :) This is specifically a C++11 solution. The standing document that explains how to detect if the implementation has the feature says we should use __has_include. So we do. See also QTBUG-62107. PS: looks like VS 15.3 has __has_include. I haven't confirmed that. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QTimer::setInterval() and
Il 07/12/2017 17:01, Thiago Macieira ha scritto: See also how no version of Visual Studio has __has_include, so the functionality is disabled with Microsoft's compiler until they implement the macro. Actually VS 2017 should have __has_include: https://docs.microsoft.com/en-us/cpp/visual-cpp-language-conformance -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - Qt, C++ and OpenGL Experts smime.p7s Description: Firma crittografica S/MIME ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QTimer::setInterval() and
Am 07.12.2017 um 17:01 schrieb Thiago Macieira: So you upgrade your compiler. No problem from my side :) See also how no version of Visual Studio has __has_include, so the functionality is disabled with Microsoft's compiler until they implement the macro. This is a conscious decision. Then it's even more important to document that those functions are not available for compilers which do not support __has_include. Really hoped this was just a leftover from pre c++11 times :) Will fill a documentation bug report this evening. Christian ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QTimer::setInterval() and
On Thursday, 7 December 2017 00:19:14 PST Christian Ehrlicher wrote: > Hi, > > According to QTimer documentation, > QTimer::setInterval(std::chrono::milliseconds) is available unconditionally > in Qt 5.9. But in qtimer.h the std::chrono - functions are guarded with > QT_HAS_INCLUDE(chrono) which expands to __has_include(chrono) or 0. The > problem is that gcc 4.8 doesn't know anything about this preprocessor > construct So you upgrade your compiler. See also how no version of Visual Studio has __has_include, so the functionality is disabled with Microsoft's compiler until they implement the macro. This is a conscious decision. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QTimer::setInterval() and
Il 07/12/2017 10:55, Christian Ehrlicher ha scritto: And shouldn't the documentation state that some functions are not available, even the used compiler supports it, just because the check is using some other feature which prevents the usage... Yes, it should. Please file a bug report. Cheers, -- Giuseppe D'Angelo | giuseppe.dang...@kdab.com | Senior Software Engineer KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - Qt, C++ and OpenGL Experts smime.p7s Description: Firma crittografica S/MIME ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QTimer::setInterval() and
Gesendet: Donnerstag, 07. Dezember 2017 um 10:37 Uhr Von: "Giuseppe D'Angelo" <giuseppe.dang...@kdab.com> An: development@qt-project.org Betreff: Re: [Development] QTimer::setInterval() and Support for 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. Maybe this is the better question - is there any platform which does not provide proper support for in 5.9 (or 5.10/11)? And shouldn't the documentation state that some functions are not available, even the used compiler supports it, just because the check is using some other feature which prevents the usage... Christian ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
Re: [Development] QTimer::setInterval() and
Il 07/12/2017 09:19, Christian Ehrlicher ha scritto: From my pov 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, , ). Support for 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.dang...@kdab.com | Senior Software Engineer KDAB (UK) Ltd., a KDAB Group company | Tel: UK +44-1625-809908 KDAB - Qt, C++ and OpenGL Experts smime.p7s Description: Firma crittografica S/MIME ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development
[Development] QTimer::setInterval() and
Hi, According to QTimer documentation, QTimer::setInterval(std::chrono::milliseconds) is available unconditionally in Qt 5.9. But in qtimer.h the std::chrono - functions are guarded with QT_HAS_INCLUDE(chrono) which expands to __has_include(chrono) or 0. The problem is that gcc 4.8 doesn't know anything about this preprocessor construct and therefore QTimer::setInterval(std::chrono::milliseconds) is not available there. According to the gcc release notes __has_include() was introduced in gcc 5 ( https://www.gnu.org/software/gcc/gcc-5/changes.html#c-family ). From my pov 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 Thx, Christian ___ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development