diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-10-12 16:45:12 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2016-10-13 13:00:12 +0000 |
commit | fa063ccbc2bb2b88a6168f8794874cdea363e049 (patch) | |
tree | 2766e0ebbb25e82d39f43fd35df33e79a571170c /src | |
parent | 042640042491106a2f5cbb6a93bbf8c0cade0b9d (diff) |
qmltest: Fix build on Windows 32bit
Define NOMINMAX for windows.h included via the private headers
of the benchmark code to prevent it from clashing with qnumeric_p.h.
Change-Id: I72daf23cda3ad67c580e14b8c92f97b5c97f8c58
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qmltest/quicktestresult.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/qmltest/quicktestresult.cpp b/src/qmltest/quicktestresult.cpp index e05d29bc05..dd78b82dcb 100644 --- a/src/qmltest/quicktestresult.cpp +++ b/src/qmltest/quicktestresult.cpp @@ -46,6 +46,11 @@ #include <QtTest/private/qtestlog_p.h> #include "qtestoptions_p.h" #include <QtTest/qbenchmark.h> +// qbenchmark_p.h pulls windows.h via 3rd party; prevent it from defining +// the min/max macros which would clash with qnumeric_p.h's usage of min()/max(). +#if defined(Q_OS_WIN32) && !defined(NOMINMAX) +# define NOMINMAX +#endif #include <QtTest/private/qbenchmark_p.h> #include <QtCore/qset.h> #include <QtCore/qmap.h> |