- 
    Bug 
- 
    Resolution: Duplicate
- 
     Not Evaluated Not Evaluated
- 
    None
- 
    5.0.2
- 
    None
- 
    1. Visual Studio Ultimate 2012 Update 2.
 2. Qt 5.0.2 built from sources as shared library.
 3. Qt Add-in 1.2.1
Failed to build application that uses QDateTime class with Visual C++ 11.0 due to absence of macro NOMINMAX (Windows specific):
1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): warning C4003: not enough actual parameters for macro 'min'
1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): error C2589: '(' : illegal token on right side of '::'
1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): error C2059: syntax error : '::'
If Qt needs NOMINMAX to be defined for building itself - that's ok. But I think that Qt shouldn't require this macro definition from users of Qt. Solution is very simple - make public headers of Qt independent of NOMINMAX (see qdatetime.h.patch).
- is replaced by
- 
                    QTBUG-42767 QDateTime::nullJd usage of numeric_limits -         
- Closed
 
-