diff --git a/src/testlib/qtestcrashhandler_p.h b/src/testlib/qtestcrashhandler_p.h index 29e80203288..d11ea964b58 100644 --- a/src/testlib/qtestcrashhandler_p.h +++ b/src/testlib/qtestcrashhandler_p.h @@ -30,7 +30,6 @@ #ifdef Q_OS_WIN #include -#include // for Sleep #endif QT_BEGIN_NAMESPACE @@ -88,9 +87,6 @@ namespace CrashHandler { { public: WindowsFaultHandler(); - - private: - static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo); }; using FatalSignalHandler = WindowsFaultHandler; #elif defined(Q_OS_UNIX) && !defined(Q_OS_WASM) diff --git a/src/testlib/qtestcrashhandler_win.cpp b/src/testlib/qtestcrashhandler_win.cpp index 8afb45e7b02..f814a6bc68e 100644 --- a/src/testlib/qtestcrashhandler_win.cpp +++ b/src/testlib/qtestcrashhandler_win.cpp @@ -16,6 +16,7 @@ #if !defined(Q_CC_MINGW) || (defined(Q_CC_MINGW) && defined(__MINGW64_VERSION_MAJOR)) # include #endif +#include QT_BEGIN_NAMESPACE @@ -168,6 +169,8 @@ DebugSymbolResolver::Symbol DebugSymbolResolver::resolveSymbol(DWORD64 address) } } // unnamed namespace +static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo); + WindowsFaultHandler::WindowsFaultHandler() { # if !defined(Q_CC_MINGW) @@ -177,7 +180,7 @@ WindowsFaultHandler::WindowsFaultHandler() SetUnhandledExceptionFilter(windowsFaultHandler); } -LONG WINAPI WindowsFaultHandler::windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo) +static LONG WINAPI windowsFaultHandler(struct _EXCEPTION_POINTERS *exInfo) { enum { maxStackFrames = 100 }; char appName[MAX_PATH];