From e01c25e85962dcb12cd6faae4c07d62a84c39e6f Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Fri, 19 Nov 2021 13:05:38 +0800 Subject: 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 Reviewed-by: Joerg Bornemann Reviewed-by: Edward Welbourne --- tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp | 2 +- tests/auto/corelib/io/qsavefile/tst_qsavefile.cpp | 2 +- tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp | 2 +- tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp | 2 +- tests/auto/corelib/thread/qthread/tst_qthread.cpp | 2 +- tests/auto/corelib/tools/qsharedpointer/externaltests.cpp | 2 +- tests/auto/gui/image/qpixmap/tst_qpixmap.cpp | 2 +- tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp | 2 +- tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp | 2 +- tests/auto/testlib/selftests/crashes/tst_crashes.cpp | 2 +- tests/auto/widgets/graphicsview/qgraphicsitem/tst_qgraphicsitem.cpp | 2 +- tests/auto/widgets/itemviews/qitemdelegate/tst_qitemdelegate.cpp | 2 +- tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp | 2 +- tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp | 4 +--- 14 files changed, 14 insertions(+), 16 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp index 1fe47f196a..8b61025cc0 100644 --- a/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp +++ b/tests/auto/corelib/io/qfilesystemwatcher/tst_qfilesystemwatcher.cpp @@ -38,7 +38,7 @@ #include #include #if defined(Q_OS_WIN) -#include +#include #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 ad4bcb3cf5..3d09ea291d 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 +# include #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 ea08ef0e65..d4760c0afd 100644 --- a/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp +++ b/tests/auto/corelib/io/qtemporarydir/tst_qtemporarydir.cpp @@ -38,7 +38,7 @@ #include #ifdef Q_OS_WIN # include -# include +# include #endif #ifdef Q_OS_UNIX // for geteuid() # include diff --git a/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/corelib/io/qtemporaryfile/tst_qtemporaryfile.cpp index e19443e1f5..732b2fa4a8 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 -# include +# include #endif #if defined(Q_OS_UNIX) # include diff --git a/tests/auto/corelib/thread/qthread/tst_qthread.cpp b/tests/auto/corelib/thread/qthread/tst_qthread.cpp index a396ebffc2..9dcaaf99e9 100644 --- a/tests/auto/corelib/thread/qthread/tst_qthread.cpp +++ b/tests/auto/corelib/thread/qthread/tst_qthread.cpp @@ -46,7 +46,7 @@ #include #endif #if defined(Q_OS_WIN) -#include +#include #if defined(Q_OS_WIN32) #include #endif diff --git a/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp b/tests/auto/corelib/tools/qsharedpointer/externaltests.cpp index 37a24b6b9b..08b0f21cc9 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 \n" + "#include \n" "#if defined(Q_CC_MSVC)\n" "#include \n" "#endif\n" diff --git a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp index 6c6c282af4..69f6796bbb 100644 --- a/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp +++ b/tests/auto/gui/image/qpixmap/tst_qpixmap.cpp @@ -46,7 +46,7 @@ #include #ifdef Q_OS_WIN -#include +#include #endif diff --git a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp index d907ea34aa..98644933fd 100644 --- a/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp +++ b/tests/auto/network/kernel/qhostinfo/tst_qhostinfo.cpp @@ -52,7 +52,7 @@ #include #if defined(Q_OS_WIN) -#include +#include #else #include #include diff --git a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp index bd0f4feb09..3dffef3b3c 100644 --- a/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp +++ b/tests/auto/printsupport/kernel/qprinter/tst_qprinter.cpp @@ -45,7 +45,7 @@ #include #ifdef Q_OS_WIN -#include +#include #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 4dcb6aa0ad..99f7ad4137 100644 --- a/tests/auto/testlib/selftests/crashes/tst_crashes.cpp +++ b/tests/auto/testlib/selftests/crashes/tst_crashes.cpp @@ -31,7 +31,7 @@ #include #ifdef Q_OS_WIN -#include +#include #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 81e95cc3df..5da8ede743 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 +#include #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 8d68ca7ac9..ad133b0422 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 +#include #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 0f98f22aaa..5ffcb5f80f 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 +# include # include # include # include diff --git a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp index 9211800eb3..cc76bff416 100644 --- a/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp +++ b/tests/auto/widgets/widgets/qdatetimeedit/tst_qdatetimeedit.cpp @@ -73,9 +73,7 @@ #include #ifdef Q_OS_WIN -# include -# undef min -# undef max +# include #endif -- cgit v1.2.3