diff options
author | Yuhang Zhao <2546789017@qq.com> | 2021-11-19 13:05:38 +0800 |
---|---|---|
committer | Yuhang Zhao <2546789017@qq.com> | 2021-11-23 12:53:46 +0800 |
commit | e01c25e85962dcb12cd6faae4c07d62a84c39e6f (patch) | |
tree | 3bf5f20608b617526b73a5ebc69ab9fc16b605dd /tests/auto | |
parent | 4c7759cae28493f492308d9e91ab5399fab89416 (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 <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'tests/auto')
14 files changed, 14 insertions, 16 deletions
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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <private/qdatetimeedit_p.h> #ifdef Q_OS_WIN -# include <windows.h> -# undef min -# undef max +# include <qt_windows.h> #endif |