summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-07-14 07:27:10 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-07-14 08:33:21 (GMT)
commit503c48853eefe547631c425e9acad810b76e61fe (patch)
tree5392090596f9f1075e576854d3a8fa065a367ef6 /src
parentf23fa541a04abd1ddc36815a285ec824d5b5c5e0 (diff)
downloadQt-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')
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.cpp8
-rw-r--r--src/corelib/global/qt_windows.h7
-rw-r--r--src/corelib/io/qfilesystemwatcher_win_p.h2
-rw-r--r--src/corelib/thread/qmutex_win.cpp2
-rw-r--r--src/corelib/thread/qthread_win.cpp2
-rw-r--r--src/corelib/tools/qdatetime.cpp2
-rw-r--r--src/gui/dialogs/qfilesystemmodel.cpp2
-rw-r--r--src/gui/dialogs/qwizard_win_p.h2
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp5
-rw-r--r--src/gui/kernel/qapplication_win.cpp17
-rw-r--r--src/gui/kernel/qdnd_p.h2
-rw-r--r--src/gui/kernel/qkeymapper_win.cpp2
-rw-r--r--src/gui/painting/qprinterinfo_win.cpp2
-rw-r--r--src/gui/util/qdesktopservices_win.cpp2
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp1
-rw-r--r--src/network/kernel/qnetworkinterface_win_p.h2
-rw-r--r--src/network/kernel/qnetworkproxy_win.cpp2
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h2
-rw-r--r--src/opengl/qgl_win.cpp2
-rw-r--r--src/qt3support/network/q3socketdevice_win.cpp7
20 files changed, 34 insertions, 39 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>
diff --git a/src/gui/dialogs/qfilesystemmodel.cpp b/src/gui/dialogs/qfilesystemmodel.cpp
index e523ec3..5a5d845 100644
--- a/src/gui/dialogs/qfilesystemmodel.cpp
+++ b/src/gui/dialogs/qfilesystemmodel.cpp
@@ -49,7 +49,7 @@
#include <qapplication.h>
#ifdef Q_OS_WIN
-#include <windows.h>
+#include <qt_windows.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/gui/dialogs/qwizard_win_p.h b/src/gui/dialogs/qwizard_win_p.h
index d3410d0..18a7531 100644
--- a/src/gui/dialogs/qwizard_win_p.h
+++ b/src/gui/dialogs/qwizard_win_p.h
@@ -56,7 +56,7 @@
#ifndef QT_NO_WIZARD
#ifndef QT_NO_STYLE_WINDOWSVISTA
-#include <windows.h>
+#include <qt_windows.h>
#include <qobject.h>
#include <qwidget.h>
#include <qabstractbutton.h>
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index 506b988..1856f4d 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -47,6 +47,8 @@
#include <qdir.h>
#if defined(Q_WS_WIN)
#define _WIN32_IE 0x0500
+#include <qt_windows.h>
+#include <commctrl.h>
#include <objbase.h>
#include <private/qpixmapdata_p.h>
#include <qpixmapcache.h>
@@ -54,9 +56,6 @@
#include <private/qt_mac_p.h>
#endif
#include <private/qfunctions_p.h>
-#ifdef Q_OS_WINCE
-#include <Commctrl.h>
-#endif
#ifndef SHGFI_ADDOVERLAYS
#define SHGFI_ADDOVERLAYS 0x000000020
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index e0c62b7..164a228 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -107,7 +107,6 @@ extern void qt_wince_hide_taskbar(HWND hwnd); //defined in qguifunctions_wince.c
#endif
#endif // QT_NO_ACCESSIBILITY
-#include <winuser.h>
#if !defined(WINABLEAPI)
# if defined(Q_WS_WINCE)
# include <bldver.h>
@@ -270,6 +269,8 @@ extern HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int
#define WM_XBUTTONDOWN 0x020B
#define WM_XBUTTONUP 0x020C
#define WM_XBUTTONDBLCLK 0x020D
+#endif
+#ifndef GET_KEYSTATE_WPARAM
#define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))
#define GET_XBUTTON_WPARAM(wParam) (HIWORD(wParam))
#define XBUTTON1 0x0001
@@ -278,14 +279,12 @@ extern HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int
#define MK_XBUTTON2 0x0040
#endif
-#ifdef Q_WS_WINCE
-#define GET_KEYSTATE_WPARAM(wParam) (LOWORD(wParam))
-#endif
-
// support for multi-media-keys
#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x0319
+#endif
+#ifndef FAPPCOMMAND_MOUSE
#define FAPPCOMMAND_MOUSE 0x8000
#define FAPPCOMMAND_KEY 0
#define FAPPCOMMAND_OEM 0x1000
@@ -353,7 +352,7 @@ extern HRGN qt_tryCreateRegion(QRegion::RegionType type, int left, int top, int
#define APPCOMMAND_MEDIA_CHANNEL_DOWN 52
#endif // APPCOMMAND_MICROPHONE_VOLUME_MUTE
-#endif // WM_APPCOMMAND
+#endif // FAPPCOMMAND_MOUSE
#if (_WIN32_WINNT < 0x0400)
// This struct is defined in winuser.h if the _WIN32_WINNT >= 0x0400 -- in the
@@ -3953,9 +3952,9 @@ qt_CloseTouchInputHandlePtr QApplicationPrivate::CloseTouchInputHandle = 0;
void QApplicationPrivate::initializeMultitouch_sys()
{
QLibrary library(QLatin1String("user32"));
- RegisterTouchWindow = static_cast<qt_RegisterTouchWindowPtr>(library.resolve("RegisterTouchWindow"));
- GetTouchInputInfo = static_cast<qt_GetTouchInputInfoPtr>(library.resolve("GetTouchInputInfo"));
- CloseTouchInputHandle = static_cast<qt_CloseTouchInputHandlePtr>(library.resolve("CloseTouchInputHandle"));
+ RegisterTouchWindow = reinterpret_cast<qt_RegisterTouchWindowPtr>(library.resolve("RegisterTouchWindow"));
+ GetTouchInputInfo = reinterpret_cast<qt_GetTouchInputInfoPtr>(library.resolve("GetTouchInputInfo"));
+ CloseTouchInputHandle = reinterpret_cast<qt_CloseTouchInputHandlePtr>(library.resolve("CloseTouchInputHandle"));
touchInputIDToTouchPointID.clear();
}
diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h
index deb52a7..852c86c 100644
--- a/src/gui/kernel/qdnd_p.h
+++ b/src/gui/kernel/qdnd_p.h
@@ -65,7 +65,7 @@
#endif
#if defined(Q_WS_WIN)
-# include <windows.h>
+# include <qt_windows.h>
# include <objidl.h>
#endif
diff --git a/src/gui/kernel/qkeymapper_win.cpp b/src/gui/kernel/qkeymapper_win.cpp
index 3d53f31..b13e622 100644
--- a/src/gui/kernel/qkeymapper_win.cpp
+++ b/src/gui/kernel/qkeymapper_win.cpp
@@ -41,7 +41,7 @@
#include "qkeymapper_p.h"
-#include <windows.h>
+#include <qt_windows.h>
#include <qdebug.h>
#include <private/qevent_p.h>
#include <private/qlocale_p.h>
diff --git a/src/gui/painting/qprinterinfo_win.cpp b/src/gui/painting/qprinterinfo_win.cpp
index a10cf3f..bea2e3a 100644
--- a/src/gui/painting/qprinterinfo_win.cpp
+++ b/src/gui/painting/qprinterinfo_win.cpp
@@ -43,7 +43,7 @@
#include <qstringlist.h>
-#include <windows.h>
+#include <qt_windows.h>
QT_BEGIN_NAMESPACE
diff --git a/src/gui/util/qdesktopservices_win.cpp b/src/gui/util/qdesktopservices_win.cpp
index e872617..00cb4ae 100644
--- a/src/gui/util/qdesktopservices_win.cpp
+++ b/src/gui/util/qdesktopservices_win.cpp
@@ -47,7 +47,7 @@
#include <qtemporaryfile.h>
#include <qcoreapplication.h>
-#include <windows.h>
+#include <qt_windows.h>
#include <shlobj.h>
#if !defined(Q_OS_WINCE)
# include <intshcut.h>
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index e78f5a7..dd92e17 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -301,6 +301,7 @@ void QAbstractScrollAreaPrivate::setupGestures()
#ifdef Q_OS_WIN
if (!viewport)
return;
+ QApplicationPrivate* getQApplicationPrivateInternal();
QApplicationPrivate *qAppPriv = getQApplicationPrivateInternal();
bool needh = (hbarpolicy == Qt::ScrollBarAlwaysOn
|| (hbarpolicy == Qt::ScrollBarAsNeeded && hbar->minimum() < hbar->maximum()));
diff --git a/src/network/kernel/qnetworkinterface_win_p.h b/src/network/kernel/qnetworkinterface_win_p.h
index c4dff76..15b4859 100644
--- a/src/network/kernel/qnetworkinterface_win_p.h
+++ b/src/network/kernel/qnetworkinterface_win_p.h
@@ -54,7 +54,7 @@
//
#include <winsock2.h>
-#include <windows.h>
+#include <qt_windows.h>
#include <time.h>
QT_BEGIN_NAMESPACE
diff --git a/src/network/kernel/qnetworkproxy_win.cpp b/src/network/kernel/qnetworkproxy_win.cpp
index 7052bcc2..9fab545 100644
--- a/src/network/kernel/qnetworkproxy_win.cpp
+++ b/src/network/kernel/qnetworkproxy_win.cpp
@@ -49,7 +49,7 @@
#include <qurl.h>
#include <string.h>
-#include <windows.h>
+#include <qt_windows.h>
#include <wininet.h>
/*
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index a38433b..7dc9fab 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -57,7 +57,7 @@
#include "qsslsocket_p.h"
#ifdef Q_OS_WIN
-#include <windows.h>
+#include <qt_windows.h>
#if defined(OCSP_RESPONSE)
#undef OCSP_RESPONSE
#endif
diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
index 86dd1d8..400b3bc 100644
--- a/src/opengl/qgl_win.cpp
+++ b/src/opengl/qgl_win.cpp
@@ -51,7 +51,7 @@
#include <qdebug.h>
#include <qcolor.h>
-#include <windows.h>
+#include <qt_windows.h>
typedef bool (APIENTRY *PFNWGLGETPIXELFORMATATTRIBIVARB)(HDC hdc,
int iPixelFormat,
diff --git a/src/qt3support/network/q3socketdevice_win.cpp b/src/qt3support/network/q3socketdevice_win.cpp
index 926d699..a0f0c0f 100644
--- a/src/qt3support/network/q3socketdevice_win.cpp
+++ b/src/qt3support/network/q3socketdevice_win.cpp
@@ -47,20 +47,15 @@
#include <string.h>
+# include <qt_windows.h>
#if defined (QT_NO_IPV6)
-# include <windows.h>
# include <winsock.h>
#else
# if defined (Q_CC_BOR) || defined (Q_CC_GNU)
# include <winsock2.h>
-# elif defined (Q_CC_INTEL)
-# include <winsock.h>
# else
-# include <windows.h>
-# if defined(Q_OS_WINCE)
# include <winsock.h>
# endif
-# endif
// Use our own defines and structs which we know are correct
# define QT_SS_MAXSIZE 128
# define QT_SS_ALIGNSIZE (sizeof(__int64))