summaryrefslogtreecommitdiffstats
path: root/src/corelib/plugin
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2012-02-01 10:19:07 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-01 11:06:19 +0100
commitb44e67e1ca5766daef3e4f7a6dd433ebe0f744d1 (patch)
treefd10ab1e36f4b0c2c6b8d2061ae3dc71c508ba7b /src/corelib/plugin
parent9fa4e51dbb8cac4f7f5a6bee6e1b9b029b57f393 (diff)
Windows: Fix inclusion of <windows.h>
- Always use <qt_windows.h> as the last file to be included. - Remove it from some headers, use Qt::HANDLE instead of HANDLE. - Clean up #ifdef, use Q_OS_WIN for Windows/Windows CE. - Add NOMINMAX to qt_windows.h to avoid problems with the min/max macros. - Remove <windows.h> from qplatformdefs.h (VS2005) Change-Id: Ic44e2cb3eafce38e1ad645c3bf85745439398e50 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Diffstat (limited to 'src/corelib/plugin')
-rw-r--r--src/corelib/plugin/qlibrary_p.h6
-rw-r--r--src/corelib/plugin/qlibrary_win.cpp2
-rw-r--r--src/corelib/plugin/qsystemlibrary_p.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/plugin/qlibrary_p.h b/src/corelib/plugin/qlibrary_p.h
index bb9a8fbb91..a5f366070c 100644
--- a/src/corelib/plugin/qlibrary_p.h
+++ b/src/corelib/plugin/qlibrary_p.h
@@ -53,14 +53,14 @@
// We mean it.
//
-#ifdef Q_OS_WIN
-# include "QtCore/qt_windows.h"
-#endif
#include "QtCore/qlibrary.h"
#include "QtCore/qpointer.h"
#include "QtCore/qstringlist.h"
#include "QtCore/qplugin.h"
#include "QtCore/qsharedpointer.h"
+#ifdef Q_OS_WIN
+# include "QtCore/qt_windows.h"
+#endif
#ifndef QT_NO_LIBRARY
diff --git a/src/corelib/plugin/qlibrary_win.cpp b/src/corelib/plugin/qlibrary_win.cpp
index 091a6715a9..19a8299b7c 100644
--- a/src/corelib/plugin/qlibrary_win.cpp
+++ b/src/corelib/plugin/qlibrary_win.cpp
@@ -51,7 +51,7 @@
#pragma message("QT_NO_LIBRARY is not supported on Windows")
#endif
-#include "qt_windows.h"
+#include <qt_windows.h>
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/plugin/qsystemlibrary_p.h b/src/corelib/plugin/qsystemlibrary_p.h
index dbcaf47306..2701d2072d 100644
--- a/src/corelib/plugin/qsystemlibrary_p.h
+++ b/src/corelib/plugin/qsystemlibrary_p.h
@@ -44,8 +44,8 @@
#include <QtCore/qglobal.h>
#ifdef Q_OS_WIN
-#include <qt_windows.h>
-#include <QtCore/qstring.h>
+# include <QtCore/qstring.h>
+# include <qt_windows.h>
QT_BEGIN_NAMESPACE