summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuhang Zhao <[email protected]>2021-11-19 13:05:38 +0800
committerYuhang Zhao <[email protected]>2021-11-23 12:53:46 +0800
commite01c25e85962dcb12cd6faae4c07d62a84c39e6f (patch)
tree3bf5f20608b617526b73a5ebc69ab9fc16b605dd
parent4c7759cae28493f492308d9e91ab5399fab89416 (diff)
QtBase: replace windows.h with qt_windows.h
We have some special handling in qt_windows.h, use it instead of the original windows.h Change-Id: I12fa45b09d3f2aad355573dce45861d7d28e1d77 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Edward Welbourne <[email protected]>
-rw-r--r--mkspecs/cygwin-g++/qplatformdefs.h2
-rw-r--r--qmake/library/ioutils.cpp2
-rw-r--r--qmake/library/qmakebuiltins.cpp2
-rw-r--r--qmake/library/qmakeevaluator.cpp2
-rw-r--r--qmake/library/qmakeglobals.cpp2
-rw-r--r--src/entrypoint/qtentrypoint_win.cpp2
-rw-r--r--src/tools/tracegen/etw.cpp2
-rw-r--r--tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp2
-rw-r--r--tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp2
-rw-r--r--tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp2
-rw-r--r--tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp2
-rw-r--r--tests/auto/corelib/thread/qthread/tst_qthread.cpp2
-rw-r--r--tests/auto/corelib/tools/qsharedpointer/externaltests.cpp2
-rw-r--r--tests/auto/gui/image/qpixmap/tst_qpixmap.cpp2
-rw-r--r--tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp2
-rw-r--r--tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp2
-rw-r--r--tests/auto/testlib/selftests/crashes/tst_crashes.cpp2
-rw-r--r--tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp2
-rw-r--r--tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp2
-rw-r--r--tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp4
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp2
-rw-r--r--tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp2
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/tst_bench_qmutex.cpp2
-rw-r--r--tests/shared/filesystem.h2
26 files changed, 26 insertions, 28 deletions
diff --git a/mkspecs/cygwin-g++/qplatformdefs.h b/mkspecs/cygwin-g++/qplatformdefs.h
index 6042f3809b3..14b0225af13 100644
--- a/mkspecs/cygwin-g++/qplatformdefs.h
+++ b/mkspecs/cygwin-g++/qplatformdefs.h
@@ -76,7 +76,7 @@
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/wait.h>
-//#include <windows.h>
+//#include <qt_windows.h>
#include <netinet/in.h>
#define QT_NO_USE_FSEEKO
diff --git a/qmake/library/ioutils.cpp b/qmake/library/ioutils.cpp
index 719d3b514ac..c46eb7b6638 100644
--- a/qmake/library/ioutils.cpp
+++ b/qmake/library/ioutils.cpp
@@ -33,7 +33,7 @@
#include <qregularexpression.h>
#ifdef Q_OS_WIN
-# include <windows.h>
+# include <qt_windows.h>
#else
# include <sys/types.h>
# include <sys/stat.h>
diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp
index 7a77e995c4a..5469a2ca7cc 100644
--- a/qmake/library/qmakebuiltins.cpp
+++ b/qmake/library/qmakebuiltins.cpp
@@ -66,7 +66,7 @@
#include <sys/stat.h>
#include <sys/utsname.h>
#else
-#include <windows.h>
+#include <qt_windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/qmake/library/qmakeevaluator.cpp b/qmake/library/qmakeevaluator.cpp
index 14d940b4b7b..3b0ff8ee934 100644
--- a/qmake/library/qmakeevaluator.cpp
+++ b/qmake/library/qmakeevaluator.cpp
@@ -57,7 +57,7 @@
# include <sys/sysctl.h>
# endif
#else
-#include <windows.h>
+#include <qt_windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/qmake/library/qmakeglobals.cpp b/qmake/library/qmakeglobals.cpp
index b4dab9ce8ff..7d51b0f1842 100644
--- a/qmake/library/qmakeglobals.cpp
+++ b/qmake/library/qmakeglobals.cpp
@@ -51,7 +51,7 @@
#include <unistd.h>
#include <sys/utsname.h>
#else
-#include <windows.h>
+#include <qt_windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
diff --git a/src/entrypoint/qtentrypoint_win.cpp b/src/entrypoint/qtentrypoint_win.cpp
index 200eb5379d6..6409096b6c2 100644
--- a/src/entrypoint/qtentrypoint_win.cpp
+++ b/src/entrypoint/qtentrypoint_win.cpp
@@ -48,7 +48,7 @@
**
****************************************************************************/
-#include <windows.h>
+#include <qt_windows.h>
#include <shellapi.h>
/*
diff --git a/src/tools/tracegen/etw.cpp b/src/tools/tracegen/etw.cpp
index b17d54bf529..8b0b7bf8881 100644
--- a/src/tools/tracegen/etw.cpp
+++ b/src/tools/tracegen/etw.cpp
@@ -129,7 +129,7 @@ static void writePrologue(QTextStream &stream, const QString &fileName, const Pr
stream << "#ifndef " << guard << "\n"
<< "#define " << guard << "\n"
<< "\n"
- << "#include <windows.h>\n"
+ << "#include <qt_windows.h>\n"
<< "#include <TraceLoggingProvider.h>\n"
<< "\n";
diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
index 1fe47f196a9..8b61025cc0d 100644
--- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
+++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp
@@ -38,7 +38,7 @@
#include <QTimer>
#include <QTemporaryFile>
#if defined(Q_OS_WIN)
-#include <windows.h>
+#include <qt_windows.h>
#endif
#ifdef Q_OS_ANDROID
diff --git a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
index ad4bcb3cf55..3d09ea291d6 100644
--- a/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
+++ b/tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp
@@ -40,7 +40,7 @@
#endif
#if defined(Q_OS_WIN)
-# include <windows.h>
+# include <qt_windows.h>
#endif
#ifdef Q_OS_INTEGRITY
diff --git a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
index ea08ef0e65a..d4760c0afd1 100644
--- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
+++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp
@@ -38,7 +38,7 @@
#include <QtTest/private/qtesthelpers_p.h>
#ifdef Q_OS_WIN
# include <shlwapi.h>
-# include <windows.h>
+# include <qt_windows.h>
#endif
#ifdef Q_OS_UNIX // for geteuid()
# include <sys/types.h>
diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
index e19443e1f50..732b2fa4a82 100644
--- a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -41,7 +41,7 @@
#if defined(Q_OS_WIN)
# include <shlwapi.h>
-# include <windows.h>
+# include <qt_windows.h>
#endif
#if defined(Q_OS_UNIX)
# include <sys/types.h>
diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
index a396ebffc2b..9dcaaf99e97 100644
--- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp
+++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp
@@ -46,7 +46,7 @@
#include <pthread.h>
#endif
#if defined(Q_OS_WIN)
-#include <windows.h>
+#include <qt_windows.h>
#if defined(Q_OS_WIN32)
#include <process.h>
#endif
diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
index 37a24b6b9b2..08b0f21cc97 100644
--- a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
+++ b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp
@@ -362,7 +362,7 @@ namespace QTest {
"}\n"
"\n"
"#ifdef Q_OS_WIN\n"
- "#include <windows.h>\n"
+ "#include <qt_windows.h>\n"
"#if defined(Q_CC_MSVC)\n"
"#include <crtdbg.h>\n"
"#endif\n"
diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
index 6c6c282af47..69f6796bbb0 100644
--- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
+++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp
@@ -46,7 +46,7 @@
#include <private/qdrawhelper_p.h>
#ifdef Q_OS_WIN
-#include <windows.h>
+#include <qt_windows.h>
#endif
diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
index d907ea34aac..98644933fd9 100644
--- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
+++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp
@@ -52,7 +52,7 @@
#include <time.h>
#if defined(Q_OS_WIN)
-#include <windows.h>
+#include <qt_windows.h>
#else
#include <unistd.h>
#include <signal.h>
diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
index bd0f4feb09a..3dffef3b3cc 100644
--- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
+++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp
@@ -45,7 +45,7 @@
#include <math.h>
#ifdef Q_OS_WIN
-#include <windows.h>
+#include <qt_windows.h>
#endif
#if QT_CONFIG(printer)
diff --git a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
index 4dcb6aa0adf..99f7ad4137f 100644
--- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
+++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp
@@ -31,7 +31,7 @@
#include <QTest>
#ifdef Q_OS_WIN
-#include <windows.h>
+#include <qt_windows.h>
#endif
class tst_Crashes: public QObject
diff --git a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
index 81e95cc3df8..5da8ede743b 100644
--- a/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -74,7 +74,7 @@ Q_DECLARE_METATYPE(QSizeF)
Q_DECLARE_METATYPE(QTransform)
#if defined(Q_OS_WIN)
-#include <windows.h>
+#include <qt_windows.h>
#define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
QSKIP("The Graphics View doesn't get the paint events");
diff --git a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
index 8d68ca7ac92..ad133b0422b 100644
--- a/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp
@@ -63,7 +63,7 @@
Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint)
#if defined (Q_OS_WIN)
-#include <windows.h>
+#include <qt_windows.h>
#define Q_CHECK_PAINTEVENTS \
if (::SwitchDesktop(::GetThreadDesktop(::GetCurrentThreadId())) == 0) \
QSKIP("The widgets don't get the paint events");
diff --git a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
index 0f98f22aaa4..5ffcb5f80f7 100644
--- a/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
+++ b/tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
@@ -47,7 +47,7 @@
using namespace QTestPrivate;
#if defined(Q_OS_WIN)
-# include <windows.h>
+# include <qt_windows.h>
# include <QDialog>
# include <QGuiApplication>
# include <QVBoxLayout>
diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
index 9211800eb34..cc76bff4163 100644
--- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
+++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp
@@ -73,9 +73,7 @@
#include <private/qdatetimeedit_p.h>
#ifdef Q_OS_WIN
-# include <windows.h>
-# undef min
-# undef max
+# include <qt_windows.h>
#endif
diff --git a/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp b/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp
index 4ed1246a6c2..b22c15b07fa 100644
--- a/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp
+++ b/tests/benchmarks/corelib/io/qdir/10000/tst_bench_qdir_10000.cpp
@@ -30,7 +30,7 @@
#include <QDirIterator>
#ifdef Q_OS_WIN
-# include <windows.h>
+# include <qt_windows.h>
#else
# include <sys/stat.h>
# include <sys/types.h>
diff --git a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
index 10b1b90ce26..fe68d9164dc 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/qfilesystemiterator.cpp
@@ -85,7 +85,7 @@
#include <qplatformdefs.h>
#ifdef Q_OS_WIN
-# include <windows.h>
+# include <qt_windows.h>
#else
# include <sys/stat.h>
# include <sys/types.h>
diff --git a/tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp b/tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp
index e7026c70f93..cbe0bf81c94 100644
--- a/tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp
+++ b/tests/benchmarks/corelib/io/qfile/tst_bench_qfile.cpp
@@ -38,7 +38,7 @@
#include <stdio.h>
#ifdef Q_OS_WIN
-# include <windows.h>
+# include <qt_windows.h>
#endif
#if defined(Q_OS_QNX) && defined(open)
diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_bench_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_bench_qmutex.cpp
index 1091ef3251b..2042aa48858 100644
--- a/tests/benchmarks/corelib/thread/qmutex/tst_bench_qmutex.cpp
+++ b/tests/benchmarks/corelib/thread/qmutex/tst_bench_qmutex.cpp
@@ -79,7 +79,7 @@ void NativeMutexUnlock(NativeMutexType *mutex)
# if !defined(_WIN32_WINNT)
# define _WIN32_WINNT 0x0A00
# endif
-# include <windows.h>
+# include <qt_windows.h>
typedef CRITICAL_SECTION NativeMutexType;
void NativeMutexInitialize(NativeMutexType *mutex)
{
diff --git a/tests/shared/filesystem.h b/tests/shared/filesystem.h
index bb9d1948e5d..769c1d843a2 100644
--- a/tests/shared/filesystem.h
+++ b/tests/shared/filesystem.h
@@ -38,7 +38,7 @@
#include <QTemporaryDir>
#if defined(Q_OS_WIN)
-#include <windows.h>
+#include <qt_windows.h>
#include <winioctl.h>
#ifndef IO_REPARSE_TAG_MOUNT_POINT
#define IO_REPARSE_TAG_MOUNT_POINT (0xA0000003L)