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 <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
This commit is contained in:
Yuhang Zhao 2021-11-19 13:05:38 +08:00
parent 4c7759cae2
commit e01c25e859
26 changed files with 26 additions and 28 deletions

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -57,7 +57,7 @@
# include <sys/sysctl.h>
# endif
#else
#include <windows.h>
#include <qt_windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>

View File

@ -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>

View File

@ -48,7 +48,7 @@
**
****************************************************************************/
#include <windows.h>
#include <qt_windows.h>
#include <shellapi.h>
/*

View File

@ -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";

View File

@ -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

View File

@ -40,7 +40,7 @@
#endif
#if defined(Q_OS_WIN)
# include <windows.h>
# include <qt_windows.h>
#endif
#ifdef Q_OS_INTEGRITY

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -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"

View File

@ -46,7 +46,7 @@
#include <private/qdrawhelper_p.h>
#ifdef Q_OS_WIN
#include <windows.h>
#include <qt_windows.h>
#endif

View File

@ -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>

View File

@ -45,7 +45,7 @@
#include <math.h>
#ifdef Q_OS_WIN
#include <windows.h>
#include <qt_windows.h>
#endif
#if QT_CONFIG(printer)

View File

@ -31,7 +31,7 @@
#include <QTest>
#ifdef Q_OS_WIN
#include <windows.h>
#include <qt_windows.h>
#endif
class tst_Crashes: public QObject

View File

@ -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");

View File

@ -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");

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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)

View File

@ -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)
{

View File

@ -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)