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 <thiago.macieira@intel.com>
This commit is contained in:
Simon Hausmann
2012-06-13 12:13:36 +02:00
committed by Qt by Nokia
parent d1b0862ad4
commit 40a95ed42c
3 changed files with 5 additions and 1 deletions

View File

@@ -53,6 +53,8 @@
#ifndef QAUDIOINPUTWIN_H
#define QAUDIOINPUTWIN_H
#define NOMINMAX
#include <windows.h>
#include <mmsystem.h>

View File

@@ -53,6 +53,8 @@
#ifndef QAUDIOOUTPUTWIN_H
#define QAUDIOOUTPUTWIN_H
#define NOMINMAX
#include <windows.h>
#include <mmsystem.h>

View File

@@ -46,7 +46,7 @@
#include <QtCore/qobject.h>
#include <QtCore/qwaitcondition.h>
#include <windows.h>
#include <qt_windows.h>
class DirectShowPostedEvent;