diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-07-14 07:27:10 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-07-14 08:33:21 (GMT) |
commit | 503c48853eefe547631c425e9acad810b76e61fe (patch) | |
tree | 5392090596f9f1075e576854d3a8fa065a367ef6 /src/corelib | |
parent | f23fa541a04abd1ddc36815a285ec824d5b5c5e0 (diff) | |
download | Qt-503c48853eefe547631c425e9acad810b76e61fe.zip Qt-503c48853eefe547631c425e9acad810b76e61fe.tar.gz Qt-503c48853eefe547631c425e9acad810b76e61fe.tar.bz2 |
Build fix for mingw
we should include qt_windows.h and not windows.h because we have to
define WINVER to 0x500.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/concurrent/qtconcurrentiteratekernel.cpp | 8 | ||||
-rw-r--r-- | src/corelib/global/qt_windows.h | 7 | ||||
-rw-r--r-- | src/corelib/io/qfilesystemwatcher_win_p.h | 2 | ||||
-rw-r--r-- | src/corelib/thread/qmutex_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/thread/qthread_win.cpp | 2 | ||||
-rw-r--r-- | src/corelib/tools/qdatetime.cpp | 2 |
6 files changed, 12 insertions, 11 deletions
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp index a26cc07..ee1ed3a 100644 --- a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp +++ b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp @@ -42,20 +42,14 @@ #include "qtconcurrentiteratekernel.h" #if defined(Q_OS_MAC) - #include <mach/mach.h> #include <mach/mach_time.h> #include <unistd.h> - #elif defined(Q_OS_UNIX) - #include <time.h> #include <unistd.h> - #elif defined(Q_OS_WIN) - -#include <windows.h> - +#include <qt_windows.h> #endif diff --git a/src/corelib/global/qt_windows.h b/src/corelib/global/qt_windows.h index 4f2bcf6..fc7d75e 100644 --- a/src/corelib/global/qt_windows.h +++ b/src/corelib/global/qt_windows.h @@ -53,6 +53,13 @@ #endif #endif +#if defined(Q_CC_MINGW) +// mingw's windows.h does not set _WIN32_WINNT, resulting breaking compilation +#ifndef WINVER +#define WINVER 0x500 +#endif +#endif + #include <windows.h> #ifdef _WIN32_WCE diff --git a/src/corelib/io/qfilesystemwatcher_win_p.h b/src/corelib/io/qfilesystemwatcher_win_p.h index d0eecfc..5d42cac 100644 --- a/src/corelib/io/qfilesystemwatcher_win_p.h +++ b/src/corelib/io/qfilesystemwatcher_win_p.h @@ -57,7 +57,7 @@ #ifndef QT_NO_FILESYSTEMWATCHER -#include <windows.h> +#include <qt_windows.h> #include <QtCore/qdatetime.h> #include <QtCore/qfile.h> diff --git a/src/corelib/thread/qmutex_win.cpp b/src/corelib/thread/qmutex_win.cpp index 1d247fc..ae79735 100644 --- a/src/corelib/thread/qmutex_win.cpp +++ b/src/corelib/thread/qmutex_win.cpp @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#include <windows.h> +#include <qt_windows.h> #include "qmutex.h" #include <qatomic.h> diff --git a/src/corelib/thread/qthread_win.cpp b/src/corelib/thread/qthread_win.cpp index 6c24784..32b680e 100644 --- a/src/corelib/thread/qthread_win.cpp +++ b/src/corelib/thread/qthread_win.cpp @@ -54,7 +54,7 @@ #include <private/qcoreapplication_p.h> #include <private/qeventdispatcher_win_p.h> -#include <windows.h> +#include <qt_windows.h> #ifndef Q_OS_WINCE diff --git a/src/corelib/tools/qdatetime.cpp b/src/corelib/tools/qdatetime.cpp index 42f4304..2c2418c 100644 --- a/src/corelib/tools/qdatetime.cpp +++ b/src/corelib/tools/qdatetime.cpp @@ -49,7 +49,7 @@ #include "qregexp.h" #include "qdebug.h" #if defined(Q_OS_WIN32) || defined(Q_OS_WINCE) -#include <windows.h> +#include <qt_windows.h> #endif #ifndef Q_WS_WIN #include <locale.h> |