From 2b1fa3a15eecbd6f05763966bd679dfe275b3175 2013-09-24 06:23:57 From: Titta Heikkala Date: 2013-09-24 06:23:57 Subject: [PATCH] Fix compiler errors when including Windows.h The Windef.h (included by Windows.h) defines min and max macros. These conflict with QBarCategoryAxis::min() and max() functions. Defining NOMINMAX suppresses the min and max definitions in Windef.h. Task-number: QTRD-2285 Change-Id: Iff797f8c3ff00a582e600db281f0f79930d7b49a Reviewed-by: Miikka Heikkinen --- diff --git a/src/qchartglobal.h b/src/qchartglobal.h index 5f2e515..2e28f95 100644 --- a/src/qchartglobal.h +++ b/src/qchartglobal.h @@ -85,4 +85,11 @@ static inline QDebug chartDebug(int numargs,...) } #endif +/* + On Windows min and max conflict with standard macros +*/ +#ifdef Q_OS_WIN +#define NOMINMAX +#endif + #endif // QCHARTGLOBAL_H