summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTitta Heikkala <titta.heikkala@digia.com>2013-09-24 08:41:33 +0300
committerTitta Heikkala <titta.heikkala@digia.com>2013-09-24 09:23:57 +0300
commit2b1fa3a15eecbd6f05763966bd679dfe275b3175 (patch)
treeded9c1db028cebf2feec9ab1ad28df83bc7ac48f /src
parent43b255a1880d0e885afebb01a1f9a1dc4bc69de5 (diff)
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 <miikka.heikkinen@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/qchartglobal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qchartglobal.h b/src/qchartglobal.h
index 5f2e5152..2e28f956 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