From 40a95ed42c34a4bdcd89c768a965c603714c5108 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 13 Jun 2012 12:13:36 +0200 Subject: [PATCH] Fix build on Windows with new qdatetime.h that doesn't redefine min/max Windows system header files redefine min/max, unless NOMINMAX is defined. In some cases we can simply include qt_windows.h, which does the trick, in other cases including qt_windows.h produces different compilation errors and it's simpler to just do the NOMINMAX trick. Change-Id: I3cf81bab7c239363adfa274f158bdf999d1d3ecd Reviewed-by: Thiago Macieira --- src/multimedia/audio/qaudioinput_win32_p.h | 2 ++ src/multimedia/audio/qaudiooutput_win32_p.h | 2 ++ src/plugins/directshow/player/directshoweventloop.h | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/multimedia/audio/qaudioinput_win32_p.h b/src/multimedia/audio/qaudioinput_win32_p.h index ef603b1..1c9c7fa 100644 --- a/src/multimedia/audio/qaudioinput_win32_p.h +++ b/src/multimedia/audio/qaudioinput_win32_p.h @@ -53,6 +53,8 @@ #ifndef QAUDIOINPUTWIN_H #define QAUDIOINPUTWIN_H +#define NOMINMAX + #include #include diff --git a/src/multimedia/audio/qaudiooutput_win32_p.h b/src/multimedia/audio/qaudiooutput_win32_p.h index a711629..a5a4852 100644 --- a/src/multimedia/audio/qaudiooutput_win32_p.h +++ b/src/multimedia/audio/qaudiooutput_win32_p.h @@ -53,6 +53,8 @@ #ifndef QAUDIOOUTPUTWIN_H #define QAUDIOOUTPUTWIN_H +#define NOMINMAX + #include #include diff --git a/src/plugins/directshow/player/directshoweventloop.h b/src/plugins/directshow/player/directshoweventloop.h index cf04b87..9dac091 100644 --- a/src/plugins/directshow/player/directshoweventloop.h +++ b/src/plugins/directshow/player/directshoweventloop.h @@ -46,7 +46,7 @@ #include #include -#include +#include class DirectShowPostedEvent; -- 2.7.4